[jira] Created: (BOO-1065) Duplicate explicit interfaces cause emit error

View: New views
1 Messages — Rating Filter:   Alert me  

[jira] Created: (BOO-1065) Duplicate explicit interfaces cause emit error

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Duplicate explicit interfaces cause emit error
----------------------------------------------

                 Key: BOO-1065
                 URL: http://jira.codehaus.org/browse/BOO-1065
             Project: Boo
          Issue Type: Bug
         Environment: Windows, r3010
            Reporter: Greg Nagel
         Attachments: ProcessExplicit.patch

{code}
interface I:
        def Foo()

class A(I):
        def I.Foo():
                print "A"

class B(A):
        def I.Foo():
                print "B"
{code}

test.boo(10,9): BCE0055: Boo.Lang.Compiler.CompilerError: Internal compiler error: Object reference not set to an instance of an object.. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Boo.Lang.Compiler.Steps.EmitAssembly.GetMethodInfo(IMethod entity)
   at Boo.Lang.Compiler.Steps.EmitAssembly.OnMethod(Method method)
   at Boo.Lang.Compiler.Ast.Method.Accept(IAstVisitor visitor)
   at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)
   --- End of inner exception stack trace ---
   at Boo.Lang.Compiler.Ast.DepthFirstVisitor.OnError(Node node, Exception error)
   at Boo.Lang.Compiler.Steps.AbstractVisitorCompilerStep.OnError(Node node, Exception error)
   at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)
   at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node[] array)
   at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit[T](NodeCollection`1 collection)
   at Boo.Lang.Compiler.Steps.EmitAssembly.EmitTypeDefinition(TypeDefinition node)
   at Boo.Lang.Compiler.Steps.EmitAssembly.OnClassDefinition(ClassDefinition node)
   at Boo.Lang.Compiler.Ast.ClassDefinition.Accept(IAstVisitor visitor)
   at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)
   at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node[] array)
   at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit[T](NodeCollection`1 collection)
   at Boo.Lang.Compiler.Steps.EmitAssembly.OnModule(Module module)
   at Boo.Lang.Compiler.Steps.EmitAssembly.DefineTypes()
   at Boo.Lang.Compiler.Steps.EmitAssembly.Run()
   at Boo.Lang.Compiler.CompilerPipeline.RunStep(CompilerContext context, ICompilerStep step)

Test case is similar to BOO-1064, but makes it all the way to the emit stage, where another error occurs.

I did some poking around and found the error might be in ProcessInheritedAbstractMembers. ExplicitInfo needs to be bound in two ways: its InterfaceType is bound in ResolveTypeReferences, and it needs to be bound itself in ProcessInheritedAbstractMembers to the method that it implements. It doesn't always get set or checked.

The submitted patch attempts to make this an error, but it causes several unrelated test cases to fail for no reason I can see.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


LightInTheBox - Buy quality products at wholesale price