Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.8.1
-
Fix Version/s: 0.8.1
-
Component/s: None
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
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.
A testcase:
Gives this error: