Skip to content

Commit 459a39e

Browse files
committed
fix unification with {}
1 parent 36eb0fc commit 459a39e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hscript/Checker.hx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,8 @@ class Checker {
597597
case [TDynamic, _]:
598598
return true;
599599
case [TAnon(a1),TAnon(a2)]:
600+
if( a2.length == 0 ) // always unify with {}
601+
return true;
600602
var m = new Map();
601603
for( f in a1 )
602604
m.set(f.name, f);

0 commit comments

Comments
 (0)