2
0
Эх сурвалжийг харах

Fixed using null looplabel in copy. Fixes #287.

woollybah 7 жил өмнө
parent
commit
77c52188df
1 өөрчлөгдсөн 5 нэмэгдсэн , 1 устгасан
  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()