Skip to content

Commit

Permalink
Add tests for 11589
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Mar 26, 2024
1 parent 17f729e commit 7e7a31f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/server/src/cases/issues/Issue11589.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package cases.issues;

class Issue11589 extends TestCase {
function test(_) {
vfs.putContent("Main.hx", getTemplate("issues/Issue11589/Main.hx"));
var args = ["--main", "Main.hx", "--no-output"];
runHaxe(args);
runHaxe(args);
Assert.isFalse(lastResult.hasError);
}

function testNestedField(_) {
vfs.putContent("Main.hx", getTemplate("issues/Issue11589/Main1.hx"));
var args = ["--main", "Main.hx", "--no-output"];
runHaxe(args);
runHaxe(args);
Assert.isFalse(lastResult.hasError);
}
}
3 changes: 3 additions & 0 deletions tests/server/test/templates/issues/Issue11589/Main.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function main() {}

typedef Foo<T> = {} & { foo:T }
7 changes: 7 additions & 0 deletions tests/server/test/templates/issues/Issue11589/Main1.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function main() {}

typedef Foo<T> = { foo : { bar : T } }

typedef Bar<T> = {
function foo( elements : Array<{ value : T }> ) : Void;
}

0 comments on commit 7e7a31f

Please sign in to comment.