浏览代码

Use local variable for everything other than constant values. Fixes #149

woollybah 9 年之前
父节点
当前提交
e320c62e98
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      stmt.bmx

+ 1 - 1
stmt.bmx

@@ -509,7 +509,7 @@ Type TForStmt Extends TLoopStmt
 		expr=expr.Semant()
 
 		' for functions and index access, use a new local variable
-		If Not TConstExpr(TBinaryCompareExpr(expr).rhs) And Not TVarExpr(TBinaryCompareExpr(expr).rhs) And Not TMemberVarExpr(TBinaryCompareExpr(expr).rhs) Then
+		If Not TConstExpr(TBinaryCompareExpr(expr).rhs) Then
 			Local tmp:TLocalDecl=New TLocalDecl.Create( "", TBinaryCompareExpr(expr).rhs.exprType,TBinaryCompareExpr(expr).rhs,, True )
 			tmp.Semant()
 			Local v:TVarExpr = New TVarExpr.Create( tmp )