class END_MenuItem : Widget
{
END_MenuItem()
{
}
};
class Widget
{
Widget( Widget@ parent = null )
{
}
};
The bug is caused when the base class doesn't have a default constructor, and the derived class doesn't explicitly call the base class' constructor with the appropriate arguments. As the compiler didn't see an explicit call to any of the base class' constructors it tries to call the default constructor which until version 2.22.1 was implemented automatically.
The correct behaviour in this case is for AngelScript to give an error message to tell the script writer to explicitly call the base constructor with super(...);.
I'll work on implementing this verification and appropriate error message, but until then you can work around the problem in 3 ways:
1. Explicitly call the base class' constructor with 'super(null);'
2. Implement a default constructor in the Widget class
3. Configure AngelScript to automatically provide the default constructor with engine->SetEngineProperty(asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT, true);
Regards,
Andreas