Skip to content

Value messes up type checking for object types #87

@gene-pauly-byborg

Description

@gene-pauly-byborg
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions