浏览代码

Fixed const decl copy before semanting. Fixes #298.

woollybah 7 年之前
父节点
当前提交
6477dc9b0e
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      decl.bmx

+ 5 - 1
decl.bmx

@@ -557,7 +557,11 @@ Type TConstDecl Extends TValDecl
 	End Method
 
 	Method OnCopy:TDecl(deep:Int = True)
-		Return New TConstDecl.Create( ident,ty,CopyInit(), attrs )
+		If IsSemanted() Then
+			Return New TConstDecl.Create( ident,ty,CopyInit(), attrs )
+		Else
+			Return New TConstDecl.Create( ident, declTy, declInit, attrs)
+		End If
 	End Method
 	
 	Method OnSemant()