浏览代码

Fixed using null looplabel in copy. Fixes #287.

woollybah 7 年之前
父节点
当前提交
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()