The compiler cannot disambiguate between different callables with the similar signature, where the callables have a different number of generic parameters.
class Class:
def Method(arg as int):
return"regular method"
def Method[of T](arg as T):
return"generic method"
c = Class()
print c.Method(42)
The code above should print "regular method", but gives a "cannot resolve ambiguous member" error.
According to the C# spec, the most specific member should be selected - in this case, the one with no generic arguments.
Description
(forked from BOO-882)
The compiler cannot disambiguate between different callables with the similar signature, where the callables have a different number of generic parameters.
class Class:
def Method(arg as int):
return"regular method"
def Method[of T](arg as T):
return"generic method"
c = Class()
print c.Method(42)
The code above should print "regular method", but gives a "cannot resolve ambiguous member" error.
According to the C# spec, the most specific member should be selected - in this case, the one with no generic arguments.
Gives this error: