BindBaseTypes.cs.patch fixes this issue.
ProcessInheritedAbstractMembers.cs.patch fixes a closely-related issue.
All previous passing
BindBaseTypes.ResolveBaseTypes previously grouped all base types (classes and interfaces) into one visited list. This can result in an interface being visited twice in certain situations such as in this issue's test case. The patch modifies this method to distinguish between classes and interfaces and places them into two separate visited lists. Inheritance cycles will still be detected for both classes and interfaces.
Another issue is so closely related that I'm placing the fix for it here also. In the test case if IFoo and BaseFoo have an Event defined and are referenced from an assembly compiled from C#, the following exception occurs...
Entering Boo.Lang.Compiler.Steps.ProcessInheritedAbstractMembers
test.boo(11,11): node 'IBar' mark visited.
test.boo(14,7): node 'MyFoo' mark visited.
test.boo(14,7): Internal compiler error on node 'MyFoo': System.NullReferenceException: Object reference not set to an instance of an object.
at Boo.Lang.Compiler.Steps.ProcessInheritedAbstractMembers.CheckInheritedEventImpl(IEvent impl, IEvent target)
at Boo.Lang.Compiler.Steps.ProcessInheritedAbstractMembers.CheckInheritsInterfaceImplementation(ClassDefinition node, IEntity entity)
at Boo.Lang.Compiler.Steps.ProcessInheritedAbstractMembers.ResolveAbstractEvent(ClassDefinition node, TypeReference baseTypeRef, IEvent entity)
...
The problem is that C# gives an Event and its corresponding MulticastDelegate field identical names. Having members with identical names is not taken into account in ProcessInheritedAbstractMembers.CheckInheritsInterfaceImplementation which loops through an external type's members and replaces any ExternalEvents with their identically-named ExternalField. The patch modifies this method to not replace an ExternalEvent with an ExternalField of a type descending from MulticastDelegate.
This attachment provides a VS2005 solution that is a more complete example than in the issue description.
It fails to compile with the following error:
Error BCE0055: Internal compiler error: Object reference not set to an
instance of an object..
This error occurs within the ProcessInheritedAbstractMembers step.