The type field in the marshalling type annotation must be a string literal, providing anything else will result in this error.
The following examples generate CPP0007.
@:semantics(value) @:cpp.ValueType({ type : Foo }) // CPP0007 extern class Bar { function new():Void; } function main() { final b = new Bar(); }
@:semantics(value) @:cpp.ValueType({ type : 12 }) // CPP0007 extern class Bar { function new():Void; } function main() { final b = new Bar(); }