[Mono-bugs] [Bug 496040] New: Internal compiler error during compilation due to missing non-generic GetEnumerator() method

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Apr 17 12:26:48 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=496040


           Summary: Internal compiler error during compilation due to
                    missing non-generic GetEnumerator() method
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.4.x
          Platform: x86-64
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: anton at lauridsen.info
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Description of Problem:
While implementing a generic IList interface, a missing non generic
GetEnumerator() method causes an internal compiler error in the gmcs compiler.


Steps to reproduce the problem:
1. Download the attached two files into a folder
2. type "gmcs /target:library List.cs"
3. type "gmcs /target:exe /r:List.dll Main.cs"

Actual Results:
no implementation for interface method
System.Collections.IEnumerable::GetEnumerator() in class Bug.List
METHOD .ctor()
METHOD IndexOf(uint)
METHOD Insert(int,uint)
METHOD RemoveAt(int)
METHOD get_Item(int)
METHOD set_Item(int,uint)
METHOD GetEnumerator()
METHOD Add(uint)
METHOD Clear()
METHOD Contains(uint)
METHOD CopyTo(uint[],int)
METHOD Remove(uint)
METHOD get_Count()
METHOD get_IsReadOnly()
no implementation for interface method
System.Collections.IEnumerable::GetEnumerator() in class Bug.List
METHOD .ctor()
METHOD IndexOf(uint)
METHOD Insert(int,uint)
METHOD RemoveAt(int)
METHOD get_Item(int)
METHOD set_Item(int,uint)
METHOD GetEnumerator()
METHOD Add(uint)
METHOD Clear()
METHOD Contains(uint)
METHOD CopyTo(uint[],int)
METHOD Remove(uint)
METHOD get_Count()
METHOD get_IsReadOnly()
Exception caught by the compiler while compiling:
   Block that caused the problem begin at: Main.cs(34,36):
                     Block being compiled: [Main.cs(35,17):,Main.cs(39,17):]
System.TypeLoadException: Could not load type 'Bug.List' from assembly 'List,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Internal compiler error at Main.cs(34,36):: exception caught while emitting
MethodBuilder [MainClass::Main]

Unhandled Exception: System.TypeLoadException: Could not load type 'Bug.List'
from assembly 'List, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
  at (wrapper managed-to-native) System.MonoType:GetMethodsByName
(string,System.Reflection.BindingFlags,bool,System.Type)
  at System.MonoType.GetMethods (BindingFlags bindingAttr) [0x00000] 
  at Mono.CSharp.MemberCache.AddMethods (BindingFlags bf, System.Type type)
[0x00000] 
  at Mono.CSharp.MemberCache.AddMethods (System.Type type) [0x00000] 
  at Mono.CSharp.MemberCache..ctor (IMemberContainer container) [0x00000] 
  at Mono.CSharp.TypeHandle..ctor (System.Type type) [0x00000] 
  at Mono.CSharp.TypeHandle.GetTypeHandle (System.Type t) [0x00000] 
  at Mono.CSharp.TypeHandle.GetMemberCache (System.Type t) [0x00000] 
  at Mono.CSharp.TypeManager.MemberLookup_FindMembers (System.Type t,
MemberTypes mt, BindingFlags bf, System.String name, System.Boolean&
used_cache) [0x00000] 
  at Mono.CSharp.TypeManager.RealMemberLookup (System.Type invocation_type,
System.Type qualifier_type, System.Type queried_type, MemberTypes mt,
BindingFlags original_bf, System.String name, IList almost_match) [0x00000] 
  at Mono.CSharp.TypeManager.MemberLookup (System.Type invocation_type,
System.Type qualifier_type, System.Type queried_type, MemberTypes mt,
BindingFlags original_bf, System.String name, IList almost_match) [0x00000] 
  at Mono.CSharp.Expression.MemberLookup (System.Type container_type,
System.Type qualifier_type, System.Type queried_type, System.String name,
MemberTypes mt, BindingFlags bf, Location loc) [0x00000] 
  at Mono.CSharp.Expression.MemberLookupFinal (Mono.CSharp.EmitContext ec,
System.Type qualifier_type, System.Type queried_type, System.String name,
MemberTypes mt, BindingFlags bf, Location loc) [0x00000] 
  at Mono.CSharp.New.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Assign.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.SimpleAssign.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.ExpressionStatement.ResolveStatement (Mono.CSharp.EmitContext
ec) [0x00000] 
  at Mono.CSharp.StatementExpression.Resolve (Mono.CSharp.EmitContext ec)
[0x00000] 
  at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContext
anonymous_method_host, Mono.CSharp.ToplevelBlock block, Mono.CSharp.Parameters
ip, IMethodData md, System.Boolean& unreachable) [0x00000] 


Expected Results:
A standard CS error during compilation regarding the missing non-generic
implementation of "GetEnumerator()"

How often does this happen? 
unconditionally

Additional Information:

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list