package;
class Test {
static function main() {
//var x:Data = { foo: 1 }; // Error: { foo : Int } has extra field foo
var x:coconut.data.Value<Data> = { foo: 1 }; // Compiles
}
}
typedef Data = {
@:optional var bar:Int;
}
Expected: when using Value, there should be the same "extra field" error as when using the plain type.