Boo

Ambiguous reference when trying to access a non-explicit member which also has an explicit implementation overload

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.8.1, 0.8.2, 0.9
  • Fix Version/s: 0.9
  • Component/s: Compiler
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    0

Description

cedric@laptop:~/dev/workspace/boo/boo$ cat ifoo.boo 
interface IFoo:
        def Foo()

interface IFoo2:
        def Foo()

class Bar3(IFoo,IFoo2):
    def IFoo.Foo():
        print "IFoo.Foo"
    def Foo():
        print "Foo"

z as IFoo = Bar3()
z.Foo()    #works
aa = Bar3()
aa.Foo()
cedric@laptop:~/dev/workspace/boo/boo$ booc ifoo.boo 
Boo Compiler version 0.8.2.2963 (CLR v2.0.50727.42)
ifoo.boo(16,7): BCE0004: Ambiguous reference 'Foo': Bar3.Foo(), Bar3.Foo().
1 error(s).

Strangely, this works with booish (??!) :

cedric@laptop:~/dev/workspace/boo/boo$ booi ifoo.boo 
ifoo.boo(16,7): BCE0004: Boo.Lang.Compiler.CompilerError: Ambiguous reference 'Foo': Bar3.Foo(), Bar3.Foo().

cedric@laptop:~/dev/workspace/boo/boo$ booish ifoo.boo 
Welcome to booish, an interpreter for the boo programming language.
Running boo 0.8.2.2963 in CLR v2.0.50727.42.

Enter boo code in the prompt below (or type /help).
Evaluating 'ifoo.boo' ...
IFoo.Foo
Foo
>>>

Issue Links

Activity

Hide
Avishay Lavie added a comment -

Fixed in revision 3000.
Sorry for snatching this from you, Cedric (I'll give you one of mine in return if you like ).

Show
Avishay Lavie added a comment - Fixed in revision 3000. Sorry for snatching this from you, Cedric (I'll give you one of mine in return if you like ).

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: