Issue Details (XML | Word | Printable)

Key: BOO-1095
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Cedric Vivier
Reporter: Cedric Vivier
Votes: 0
Watchers: 0
Operations

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

Ambiguous reference when subclassing method with ref parameter of an internal type

Created: 06/Nov/08 01:11 PM   Updated: 17/Jan/09 02:28 AM   Resolved: 17/Jan/09 02:28 AM
Return to search
Component/s: None
Affects Version/s: 0.8.2
Fix Version/s: 0.9

Time Tracking:
Not Specified

Testcase included: yes


 Description  « Hide
class Bar:
	pass

interface IFoo:
	def Bar(ref x as Bar) as bool

class Foo (IFoo):
	def Bar(ref x as Bar) as bool:
		return true

x as Bar
Foo().Bar(x)   #BCE0004: Ambiguous reference 'Bar': Foo.Bar(Bar), Foo.Bar(Bar), Foo.Bar(Bar).

If parameter 'x' is an external type instead of an internal type, it works.



Cedric Vivier added a comment - 06/Nov/08 01:13 PM

Simpler testcase (no need for an abstract class in the middle to trigger the bug)


Cedric Vivier made changes - 06/Nov/08 01:13 PM
Field Original Value New Value
Description {code}
class Bar:
pass

interface IFoo:
def Bar(ref x as Bar) as bool

abstract class AbstractFoo (IFoo):
abstract def Bar(ref x as Bar) as bool:
pass

class Foo (AbstractFoo):
def Bar(ref x as Bar) as bool:
return true

x as Bar
Foo().Bar(x) #BCE0004: Ambiguous reference 'Bar': Foo.Bar(Bar), Foo.Bar(Bar), Foo.Bar(Bar).
{code}


If parameter 'x' is an external type instead of an internal type, it works.

{code}
class Bar:
pass

interface IFoo:
def Bar(ref x as Bar) as bool

class Foo (IFoo):
def Bar(ref x as Bar) as bool:
return true

x as Bar
Foo().Bar(x) #BCE0004: Ambiguous reference 'Bar': Foo.Bar(Bar), Foo.Bar(Bar), Foo.Bar(Bar).
{code}


If parameter 'x' is an external type instead of an internal type, it works.
Cedric Vivier made changes - 13/Nov/08 12:55 PM
Assignee Cedric Vivier [ cedricv ]
Cedric Vivier made changes - 16/Jan/09 07:10 AM
Status Open [ 1 ] In Progress [ 3 ]
Cedric Vivier added a comment - 17/Jan/09 02:28 AM

Fixed in rev. 3115


Cedric Vivier made changes - 17/Jan/09 02:28 AM
Resolution Fixed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]