History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-960
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Avishay Lavie
Reporter: Avishay Lavie
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

Compiler cannot disambiguate between regular and generically mapped callables

Created: 05/Feb/08 03:14 PM   Updated: 09/Apr/08 04:50 PM
Component/s: None
Affects Version/s: 0.8
Fix Version/s: 0.8.1

Time Tracking:
Not Specified

Issue Links:
Related
 

Testcase included: yes


 Description  « Hide
(forked from BOO-882)

The compiler cannot disambiguate between different callables with the same signature, where one of the callables was created as a result of generic construction.

class Class[of T]:
  def Method(arg as int):
    return "regular method"

  def Method(arg as T):
    return "generic mapped method"

c = Class[of int]()
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.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Avishay Lavie - 06/Feb/08 04:24 PM
Fixed in 2852.