I am trying to do the following:
public class character extends entity {
public const type:int = CHARACTER;
}
public class entity extends Sprite {
public const type:int = INVALID;
public const INVALID:int = -1;
public const CHARACTER:int = 1;
}
But the compiler throws:
Error: A conflict exists with inherited definition dieEngine:entity.type in namespace public. public const type:int = CHARACTER;
well, constants are constants no matter if they are inherited or not and should not be overriden, think of that like the a complete class which defines two times the required constant.
If you really want to override it, you should set that
varinstead ofconstUse:
instead of: