Преглед на файлове

Fixed eachin for iterable. Resolves #607.

Brucey преди 2 години
родител
ревизия
863e2ef3bc
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      parser.bmx

+ 2 - 2
parser.bmx

@@ -313,7 +313,7 @@ Type TForEachinStmt Extends TLoopStmt
 				Local varTmp:TLocalDecl=New TLocalDecl.Create( varid,varty,cExpr)
 				Local varTmp:TLocalDecl=New TLocalDecl.Create( varid,varty,cExpr)
 
 
 				If Not TNumericType(varty) And Not varObjTmp Then
 				If Not TNumericType(varty) And Not varObjTmp Then
-					If iterable And TStringType(varty) Then
+					If iterable Then
 						'
 						'
 					Else
 					Else
 						' local var as expression
 						' local var as expression
@@ -380,7 +380,7 @@ Type TForEachinStmt Extends TLoopStmt
 				' var = Null
 				' var = Null
 '				Local expr:TExpr=New TBinaryCompareExpr.Create( "=",New TIdentExpr.Create( varid ), New TNullExpr.Create(TType.nullObjectType))
 '				Local expr:TExpr=New TBinaryCompareExpr.Create( "=",New TIdentExpr.Create( varid ), New TNullExpr.Create(TType.nullObjectType))
 				If Not TNumericType(varty) And Not varObjTmp Then
 				If Not TNumericType(varty) And Not varObjTmp Then
-					If iterable And TStringType(varty) Then
+					If iterable Then
 						'
 						'
 					Else
 					Else
 						Local expr:TExpr=New TBinaryCompareExpr.Create( "=",varExpr, New TNullExpr.Create(TType.nullObjectType))
 						Local expr:TExpr=New TBinaryCompareExpr.Create( "=",varExpr, New TNullExpr.Create(TType.nullObjectType))