Răsfoiți Sursa

Fixed invalid nested function declaration.

woollybah 8 ani în urmă
părinte
comite
29553ef050
1 a modificat fișierele cu 4 adăugiri și 2 ștergeri
  1. 4 2
      reflection.mod/reflection.bmx

+ 4 - 2
reflection.mod/reflection.bmx

@@ -1911,8 +1911,10 @@ Type TTypeId
 	about: Returns a list of all functions in type hierarchy
 	about: Returns a list of all functions in type hierarchy
 	End Rem
 	End Rem
 	Method EnumFunctions:TList( list:TList=Null )
 	Method EnumFunctions:TList( list:TList=Null )
-		Function compareFunction:Int( a:TFunction, b:TFunction)
-			Return a.Name().Compare(b.Name())
+		Function compareFunction:Int( a:Object, b:Object)
+			If TFunction(a) And TFunction(b) Then
+				Return TFunction(a).Name().Compare(TFunction(b).Name())
+			End If
 		EndFunction
 		EndFunction
 
 
 		If Not list list=New TList
 		If Not list list=New TList