0

In a class hierarchy where:

MngLayers extends Manager_Panel, which extends Manager_Base...

-- In Manager_Base, I've defined an init() method:

public class Manager_Base {
    //....

    public function init():void {
        //Do initialization here...
    }
}

-- In Manager_Panel, I do NOT override the init() method.

-- In MngLayers, I override the init() method.

public override function init():void {
    super.init();
    //Do custom initialization here...  
}

When I attempt to compile this, I get this unhelpful compilation error:

Error: A conflict exists with definition init in namespace public.

I'm not sure this matters, but I'm using the ASC2.0 compiler (from the AIR SDK 3.7) with -inline support.

Is there something broken in the compiler that prevents it from doing simple method-overriding compilation like the previous compiler could?

chamberlainpi
  • 4,854
  • 8
  • 32
  • 63

1 Answers1

0

AH! Damn, well it's just the ASC2.0 not being descriptive enough!

My bad, I had a duplicate init() overriden method in the leaf sub-class (MngLayers) all this time. It would of helped if the compiler pointed out that duplicate one instead!

Hope this helps anyone else making the same rookie mistake! :D

chamberlainpi
  • 4,854
  • 8
  • 32
  • 63
  • The error is actually extremely descriptive. You had conflicting function names using "init" that were using the "public" namespace. – Josh Apr 25 '13 at 21:04
  • Nope, cuz it didn't point out the line number to any (or both) of the method declarations conflicting. – chamberlainpi Apr 26 '13 at 01:12