Deal with ENew and EConst(CIdent)). Updated tests & doc.

This commit is contained in:
back2dos
2013-11-06 21:59:35 +01:00
parent aefe622434
commit 872b6be411
3 changed files with 30 additions and 2 deletions

View File

@@ -46,7 +46,6 @@ class Exprs extends Base {
test(macro @yield while (_) foo, macro while (_) foo, { leaveLoops: true });
test(macro @yield [while (_) foo], macro [while (_) foo]);
}
function testSubstitute() {
exprEq(
macro foo.call(arg1, arg2),
@@ -67,5 +66,18 @@ class Exprs extends Base {
'C' => macro : Array<Float>
])
);
exprEq(
macro {
new Foo<Bar>(1, 2, 3);
Bar.foo();
},
(macro {
new X(1, 2, 3);
Y.foo();
}).substParams([
'X' => macro : Foo<Bar>,
'Y' => macro : Bar
])
);
}
}