From ab8724914d8299300c5134b9219aab65b0609b5d Mon Sep 17 00:00:00 2001 From: Rudy Ges Date: Tue, 21 Jan 2025 13:57:42 +0100 Subject: [PATCH] [tests] Add test for #5214 --- tests/misc/projects/Issue5214/Main.hx | 16 ++++++++++++++++ tests/misc/projects/Issue5214/compile.hxml | 1 + 2 files changed, 17 insertions(+) create mode 100644 tests/misc/projects/Issue5214/Main.hx create mode 100644 tests/misc/projects/Issue5214/compile.hxml diff --git a/tests/misc/projects/Issue5214/Main.hx b/tests/misc/projects/Issue5214/Main.hx new file mode 100644 index 00000000000..ed0bf636efe --- /dev/null +++ b/tests/misc/projects/Issue5214/Main.hx @@ -0,0 +1,16 @@ +class C{ + var v:T; + public function new(v:T) this.v = v; +} + +class Main { + + static var ab:{a:Int,b:String} = {a:1,b:""}; + static var c = new C(ab); + static var c1 = new C({a:1,b:""}); + + static function main(){ + var c = new C(ab); + var c1 = new C({a:1,b:""}); + } +} diff --git a/tests/misc/projects/Issue5214/compile.hxml b/tests/misc/projects/Issue5214/compile.hxml new file mode 100644 index 00000000000..42409e72918 --- /dev/null +++ b/tests/misc/projects/Issue5214/compile.hxml @@ -0,0 +1 @@ +-main Main