Native marshalling types must be annotated with value semantics to ensure the generated code is sound. Classes or enums annotated with :cpp.ValueType or :cpp.PointerType but without :semantics(value) will generate this error.
The following examples generate CPP0001.
// CPP0001 @:cpp.ValueType extern class Foo { function new():Void; } function main() { final f = new Foo(); }
// CPP0001 @:cpp.ValueType extern enum abstract Foo(Int) { var Bar; var Baz; } function main() { final f = Foo.Bar; }
// CPP0001 @:cpp.PointerType extern class Foo {} function main() { final f : Foo = null; }