Explorar o código

Ensure args are semanted. Fixes #388.

woollybah %!s(int64=6) %!d(string=hai) anos
pai
achega
f89a3b2c0a
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      decl.bmx

+ 6 - 1
decl.bmx

@@ -1483,11 +1483,16 @@ End Rem
 	
 	
 					If i<argExprs.Length And argExprs[i]
 					If i<argExprs.Length And argExprs[i]
 					
 					
-						Local arg:TExpr = argExprs[i]
+						' ensure arg is semanted
+						Local arg:TExpr = argExprs[i].Semant()
 					
 					
 						Local declTy:TType=argDecls[i].ty
 						Local declTy:TType=argDecls[i].ty
 						Local exprTy:TType=arg.exprType
 						Local exprTy:TType=arg.exprType
 						
 						
+						If Not exprTy Then
+							InternalErr "TScopeDecl.FindFuncDecl"
+						End If
+						
 						Local widensTest:Int = True
 						Local widensTest:Int = True
 						
 						
 						' for numeric constants, allow them to be auto-cast unless
 						' for numeric constants, allow them to be auto-cast unless