What meaning this haxe error:Normal variables cannot be accessed with 'super', use 'this' instead

71 views Asked by At

I have a haxe code at the below:

private function get_parent() : DisplayObjectContainer
{
    return !!(_parent != null) ? _parent : super.parent;
}

However, Haxe always reports super.parent with error:Normal variables cannot be accessed with 'super', use 'this' instead

Who can help me? Thanks a lot.

enter image description here

1

There are 1 answers

3
Confidant On

It seems your class is already a DisplayObject, and as such the parent should not have multiple possibilities for where it is defined. Can you simply try return this.parent;?