added another test for #1416

This commit is contained in:
Jann Horn
2011-06-21 16:42:20 +02:00
committed by Michael Ficarra
parent 18f6ad9583
commit 9d3510a1e4

View File

@@ -495,3 +495,8 @@ test "#1420: things like `(fn() ->)`; there are no words for this one",
test "#1416: don't omit one 'new' when compiling 'new new'", ->
obj = new new Function "this.foo = 3"
eq obj.foo, 3
test "#1416: don't omit one 'new' when compiling 'new new fn()()'", ->
fn = -> -> @a = 2
{a} = new new fn()()
eq a, 2