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

Fixed const decl copy before semanting. Fixes #298.

woollybah 7 жил өмнө
parent
commit
6477dc9b0e
1 өөрчлөгдсөн 5 нэмэгдсэн , 1 устгасан
  1. 5 1
      decl.bmx

+ 5 - 1
decl.bmx

@@ -557,7 +557,11 @@ Type TConstDecl Extends TValDecl
 	End Method
 	End Method
 
 
 	Method OnCopy:TDecl(deep:Int = True)
 	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
 	End Method
 	
 	
 	Method OnSemant()
 	Method OnSemant()