12.6.7.4 CPP0003 - Invalid Marshalling Type Parameter

Description

Extern types annotated with :cpp.ValueType or :cpp.PointerType cannot use GC objects as type parameters, attempting to do so will generate this error.

Examples

The following example generates CPPP0003.

// CPP0003
@:semantics(value)
@:cpp.ValueType
extern class Foo<T> {
    function new():Void;
}

function main() {
    final f = new Foo<String>();
}