12.6.7.7 CPP0006 - Invalid Namespace Field

Description

The namespace field in the marshalling type annotation must be an array of string literals, providing anything else will result in this error.

Examples

The following examples generate CPP0006.

@:semantics(value)
@:cpp.ValueType({ namespace : 'foo' }) // CPP0006
extern class Bar {
    function new():Void;
}

function main() {
    final b = new Bar();
}
@:semantics(value)
@:cpp.ValueType({ namespace : [ Foo ] }) // CPP0006
extern class Bar {
    function new():Void;
}

function main() {
    final b = new Bar();
}
@:semantics(value)
@:cpp.ValueType({ namespace : [ 'foo', 12 ] }) // CPP0006
extern class Bar {
    function new():Void;
}

function main() {
    final b = new Bar();
}