Ver Fonte

Fixed using null looplabel in copy. Fixes #287.

woollybah há 7 anos atrás
pai
commit
77c52188df
1 ficheiros alterados com 5 adições e 1 exclusões
  1. 5 1
      stmt.bmx

+ 5 - 1
stmt.bmx

@@ -517,7 +517,11 @@ Type TRepeatStmt Extends TLoopStmt
 	End Method
 
 	Method OnCopy:TStmt( scope:TScopeDecl )
-		Return New TRepeatStmt.Create( block.CopyBlock( scope ),expr.Copy(),TLoopLabelDecl(loopLabel.Copy()) )
+		If loopLabel Then
+			Return New TRepeatStmt.Create( block.CopyBlock( scope ),expr.Copy(),TLoopLabelDecl(loopLabel.Copy()) )
+		Else
+			Return New TRepeatStmt.Create( block.CopyBlock( scope ),expr.Copy(),Null )
+		End If
 	End Method
 	
 	Method OnSemant()