mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 14:09:17 +02:00
* Patch from Mattias Gaertner to fix new (a())()
git-svn-id: trunk@35640 -
This commit is contained in:
parent
406c7caa6f
commit
676b25cc93
@ -784,7 +784,8 @@ begin
|
|||||||
if (MExpr is TJSPrimaryExpression)
|
if (MExpr is TJSPrimaryExpression)
|
||||||
or (MExpr is TJSDotMemberExpression)
|
or (MExpr is TJSDotMemberExpression)
|
||||||
or (MExpr is TJSBracketMemberExpression)
|
or (MExpr is TJSBracketMemberExpression)
|
||||||
or (MExpr is TJSCallExpression)
|
// Note: new requires brackets in this case: new (a())()
|
||||||
|
or ((MExpr is TJSCallExpression) and not (El is TJSNewMemberExpression))
|
||||||
or (MExpr is TJSLiteral) then
|
or (MExpr is TJSLiteral) then
|
||||||
WriteJS(MExpr)
|
WriteJS(MExpr)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user