فهرست منبع

Add aliases before processing parameter types.

woollybah 7 سال پیش
والد
کامیت
0a6a8abec1
1فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 6 2
      decl.bmx

+ 6 - 2
decl.bmx

@@ -2327,13 +2327,17 @@ End Rem
 		inst.declImported = declImported
 		inst.declImported = declImported
 
 
 		PushEnv inst
 		PushEnv inst
+		
+		' install aliases
+		For Local i:Int=0 Until args.Length
+			inst.InsertDecl New TAliasDecl.Create( args[i].ident,instArgs[i],0 )
+		Next
 
 
+		' process parameter types
 		For Local i:Int=0 Until args.Length
 		For Local i:Int=0 Until args.Length
 		
 		
 			Local arg:TTemplateArg = args[i]
 			Local arg:TTemplateArg = args[i]
 
 
-			inst.InsertDecl New TAliasDecl.Create( arg.ident,instArgs[i],0 )
-
 			' ensure parameter types are compatible
 			' ensure parameter types are compatible
 			If arg.superTy Then
 			If arg.superTy Then
 				For Local n:Int = 0 Until arg.superTy.length
 				For Local n:Int = 0 Until arg.superTy.length