diff --git a/tests/misc/projects/Issue6066/Main.hx b/tests/misc/projects/Issue6066/Main.hx new file mode 100644 index 00000000000..7cd3f994468 --- /dev/null +++ b/tests/misc/projects/Issue6066/Main.hx @@ -0,0 +1,12 @@ +typedef S = {a:Int, ?b:Int}; + +class Main { + static function f1(a:S):Void {} + static function f2(a:T):Void {} + + static function main() { + f1({a: 1}); // works + f2({a: 1}); // Constraint check failure: { a : Int } should be { ?b : Null, a : Int } + f2(({a: 1} : S)); // works + } +} diff --git a/tests/misc/projects/Issue6066/compile.hxml b/tests/misc/projects/Issue6066/compile.hxml new file mode 100644 index 00000000000..42409e72918 --- /dev/null +++ b/tests/misc/projects/Issue6066/compile.hxml @@ -0,0 +1 @@ +-main Main