Just ran into a fun failed assertion with metadata extraction in the scriptbuilder addon:
class Bar {}
class Foo { Foo(const Bar &in b) {} }
[Metadata]
Foo Test(Bar());
This fails because the declaration is wrongly extracted in CScriptBuilder::ExtractDeclaration
. The name
field actually becomes Bar
here, and the declaration contains the entire line of code.
As a workaround, this seems to work, but requires a default constructor:
class Bar {}
class Foo {
Foo() {}
Foo(const Bar &in b) {}
}
[Metadata]
Foo Test = Foo(Bar());