mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
fixes #1416: don't omit one 'new' when compiling 'new new'
This commit is contained in:
@@ -1596,7 +1596,7 @@
|
||||
return call;
|
||||
}
|
||||
if (op === 'new') {
|
||||
if (first instanceof Call && !first["do"]) {
|
||||
if (first instanceof Call && !first["do"] && !first.isNew) {
|
||||
return first.newInstance();
|
||||
}
|
||||
if (first instanceof Code && first.bound || first["do"]) {
|
||||
|
||||
@@ -1236,7 +1236,7 @@ exports.Op = class Op extends Base
|
||||
call.do = yes
|
||||
return call
|
||||
if op is 'new'
|
||||
return first.newInstance() if first instanceof Call and not first.do
|
||||
return first.newInstance() if first instanceof Call and not first.do and not first.isNew
|
||||
first = new Parens first if first instanceof Code and first.bound or first.do
|
||||
@operator = CONVERSIONS[op] or op
|
||||
@first = first
|
||||
|
||||
Reference in New Issue
Block a user