Răsfoiți Sursa

Disallow incompatible assignment of function pointers involving Var parameters

HurryStarfish 8 ani în urmă
părinte
comite
202469b2bf
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      type.bmx

+ 3 - 3
type.bmx

@@ -1742,10 +1742,10 @@ Type TFunctionPtrType Extends TType
 	Method EqualsType:Int( ty:TType )
 		If Not TFunctionPtrType(ty) Then Return False
 		Local tyfunc:TFuncDecl = TFunctionPtrType(ty).func
-		If Not func.retType.EqualsType(tyfunc.retType) Then Return False
-		If Not (func.argDecls.Length = tyfunc.argDecls.Length) Then Return False
+		If Not tyfunc.retType.EqualsType(func.retType) Then Return False
+		If Not (tyfunc.argDecls.Length = func.argDecls.Length) Then Return False
 		For Local a:Int = 0 Until func.argDecls.Length
-			If Not func.argDecls[a].ty.EqualsType(tyfunc.argDecls[a].ty) Then Return False
+			If Not tyfunc.argDecls[a].ty.EqualsType(func.argDecls[a].ty) Then Return False
 		Next
 		Return True
 	End Method