Boo

Conflicting stub is created when an external base type implements an internal interface deriving an external interface

Details

  • Type: Bug Bug
  • Status: Reopened Reopened
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 0.9.1, 0.9.2
  • Fix Version/s: 0.9.5
  • Component/s: Type System
  • Labels:
    None
  • Environment:
    debian linux, trunk build 3333
  • Testcase included:
    yes
  • Number of attachments :
    0

Description

The C# code for what I am attempting is:

using System.Collections.Generic;

interface ListInterface : IList<int> {};
class Impl : List<int>,ListInterface {};

In Boo, my attempt gives numerous errors:

import System.Collections.Generic

interface ListInterface (IList of int):
        pass

class Impl (List of int,ListInterface):
        pass

Activity

Hide
Cedric Vivier added a comment -

Duplicate of BOO-851

Show
Cedric Vivier added a comment - Duplicate of BOO-851
Hide
Cedric Vivier added a comment -

Not the same issue, my mistake, reopening before closing.

Show
Cedric Vivier added a comment - Not the same issue, my mistake, reopening before closing.
Hide
Cedric Vivier added a comment -

Fixed in rev. 3338

Show
Cedric Vivier added a comment - Fixed in rev. 3338
Hide
rektide added a comment - - edited

That definitely fixed the test case I assigned. I didnt have much luck isolating what the difference is between that case and what I actually have, but here's what I'm trying to do; its still generating the colossal list of errors that the original test case generated.

import System.Collections.Generic

interface Command:
        def Execute() as bool

interface Chain(IList of Command):
        pass

class ChainBase (List of Command,Chain):
        def Execute() as bool:
                pass
Show
rektide added a comment - - edited That definitely fixed the test case I assigned. I didnt have much luck isolating what the difference is between that case and what I actually have, but here's what I'm trying to do; its still generating the colossal list of errors that the original test case generated.
import System.Collections.Generic

interface Command:
        def Execute() as bool

interface Chain(IList of Command):
        pass

class ChainBase (List of Command,Chain):
        def Execute() as bool:
                pass
Hide
rektide added a comment -

Ah, looks to be the generics that are still throwing things off. The following variant works as expected:

import System.Collections
import System.Collections.Generic

interface Command:
        def Execute() as bool

interface Chain(IList):
        pass

class ChainBase (ArrayList,Chain):
        def Execute() as bool:
                pass
Show
rektide added a comment - Ah, looks to be the generics that are still throwing things off. The following variant works as expected:
import System.Collections
import System.Collections.Generic

interface Command:
        def Execute() as bool

interface Chain(IList):
        pass

class ChainBase (ArrayList,Chain):
        def Execute() as bool:
                pass
Hide
rektide added a comment - - edited

Problem is in ProcessInheritedAbstractMembers' CheckInheritsInterfaceImplementation:

GenericConstructedType.GetMembers()'s IEntity's FullName includes ([params])
The IEntity entity its being compared against does not have ([params]).

Still working on this defect; will consult higher authorities.

Show
rektide added a comment - - edited Problem is in ProcessInheritedAbstractMembers' CheckInheritsInterfaceImplementation: GenericConstructedType.GetMembers()'s IEntity's FullName includes ([params]) The IEntity entity its being compared against does not have ([params]). Still working on this defect; will consult higher authorities.
Hide
Avishay Lavie added a comment -

There is some ambiguity throughout the codebase regarding the role of FullName. If it's used for identifying entities in user messages (like compiler errors) then it should include details like generic parameters etc. If it's used by the compiler to match members to other members, then it should probably be more strict. Right now it's trying to do both which causes this problem.

In my opinion, the compiler should never match anything based on FullName, nor instantiate a TypeReference using a FullName of a type, or anything of the sort – that's a dangerous shortcut that leads to this kind of bugs.

Show
Avishay Lavie added a comment - There is some ambiguity throughout the codebase regarding the role of FullName. If it's used for identifying entities in user messages (like compiler errors) then it should include details like generic parameters etc. If it's used by the compiler to match members to other members, then it should probably be more strict. Right now it's trying to do both which causes this problem. In my opinion, the compiler should never match anything based on FullName, nor instantiate a TypeReference using a FullName of a type, or anything of the sort – that's a dangerous shortcut that leads to this kind of bugs.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: