You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was fighting to find the cause of a handled exception in a user's app, found out it's related to have a similar named method and assign. In this particular case it's harmless, because the late binding code later does find the method correctly and calls it, but it might be worth resolving this in the future, as it might be causing a problem in a different case.
Note that if the middle class is missing, the compiler does warn about having a same named method and property setter. But not in this case.
CLASS Parent
ASSIGN Test(u)
? "assign called"
END CLASS
CLASS Middle INHERIT Parent
END CLASS
CLASS Child INHERIT Middle
METHOD Set_test() CLIPPER
? "method called"
RETURN NIL
END CLASS
FUNCTION Start() AS VOID
LOCAL u AS USUAL
u := Child{}
u:Set_test() // System.Reflection.AmbiguousMatchException
Was fighting to find the cause of a handled exception in a user's app, found out it's related to have a similar named method and assign. In this particular case it's harmless, because the late binding code later does find the method correctly and calls it, but it might be worth resolving this in the future, as it might be causing a problem in a different case.
Note that if the middle class is missing, the compiler does warn about having a same named method and property setter. But not in this case.
The text was updated successfully, but these errors were encountered: