소스 검색

* Patch from Mattias Gaertner to fix new (a())()

git-svn-id: trunk@35640 -
michael 8 년 전
부모
커밋
676b25cc93
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      packages/fcl-js/src/jswriter.pp

+ 2 - 1
packages/fcl-js/src/jswriter.pp

@@ -784,7 +784,8 @@ begin
   if (MExpr is TJSPrimaryExpression)
       or (MExpr is TJSDotMemberExpression)
       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
     WriteJS(MExpr)
   else