[jira] Created: (BOO-1059) Compile error when classes with destructors have nested types

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

[jira] Created: (BOO-1059) Compile error when classes with destructors have nested types

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

Reply to Author | View Threaded | Show Only this Message

Compile error when classes with destructors have nested types
-------------------------------------------------------------

                 Key: BOO-1059
                 URL: http://jira.codehaus.org/browse/BOO-1059
             Project: Boo
          Issue Type: Bug
          Components: Compiler
    Affects Versions: 0.8.2
         Environment: Windows XP
            Reporter: Greg Nagel
            Priority: Minor


{code}
#class Y:
# pass

class A:
        def destructor():
                pass
        class B(Y):
                pass
{code}

Fails under 8.2 and SVN. Doesn't matter if the first two lines are uncommented, but B has to derive from something to produce the error.

Output:

test.boo(7,11): BCE0055: Boo.Lang.Compiler.CompilerError: Internal compiler error: Member type not supported: A.destruct
or. ---> System.ArgumentException: Member type not supported: A.destructor
   at Boo.Lang.Compiler.TypeSystem.TypeSystemServices.CreateEntity(TypeMember member)
   at Boo.Lang.Compiler.TypeSystem.TypeSystemServices.GetMemberEntity(TypeMember member)
   at Boo.Lang.Compiler.TypeSystem.AbstractInternalType.GetMemberEntities(TypeMemberCollection members)
   at Boo.Lang.Compiler.TypeSystem.AbstractInternalType.GetMembers()
   at Boo.Lang.Compiler.TypeSystem.AbstractInternalType.ResolveMember(List targetList, String name, EntityType flags)
   at Boo.Lang.Compiler.TypeSystem.InternalClass.Resolve(List targetList, String name, EntityType flags)
   at Boo.Lang.Compiler.TypeSystem.NameResolutionService.Resolve(List targetList, String name, EntityType flags)
   at Boo.Lang.Compiler.TypeSystem.NameResolutionService.ResolveTypeName(SimpleTypeReference node)
   at Boo.Lang.Compiler.TypeSystem.NameResolutionService.ResolveSimpleTypeReference(SimpleTypeReference node)
   at Boo.Lang.Compiler.Steps.BindBaseTypes.ResolveBaseTypes(List visited, TypeDefinition node)
   at Boo.Lang.Compiler.Steps.BindBaseTypes.OnClassDefinition(ClassDefinition node)
   at Boo.Lang.Compiler.Ast.ClassDefinition.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.AbstractNamespaceSensitiveVisitorCompilerStep.VisitTypeDefinitionBody(TypeDefinition node)

   at Boo.Lang.Compiler.Steps.AbstractNamespaceSensitiveVisitorCompilerStep.OnClassDefinition(ClassDefinition node)
   at Boo.Lang.Compiler.Steps.BindBaseTypes.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.AbstractNamespaceSensitiveVisitorCompilerStep.VisitTypeDefinitionBody(TypeDefinition node)

   at Boo.Lang.Compiler.Steps.AbstractNamespaceSensitiveVisitorCompilerStep.OnModule(Module module)
   at Boo.Lang.Compiler.Ast.Module.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.BindBaseTypes.Run()
   at Boo.Lang.Compiler.CompilerPipeline.RunStep(CompilerContext context, ICompilerStep step)



--
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