Browse Source

Fixed const decl copy before semanting. Fixes #298.

woollybah 7 năm trước cách đây
mục cha
commit
6477dc9b0e
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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()