[Mono-bugs] [Bug 345467] [Regression] Calling a generic method from inside an anonymous method passed to a method causes exceptions

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Dec 3 00:26:51 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=345467#c1





--- Comment #1 from Aaron Bockover <abockover at novell.com>  2007-12-02 22:26:50 MST ---
Created an attachment (id=185573)
 --> (https://bugzilla.novell.com/attachment.cgi?id=185573)
Test case 1

This test most closely resembles the production code. If the MakeSomething<T>
() call is replaced with null, it compiles fine.

The exception from the compiler is the following:

Unhandled Exception: Mono.CSharp.InternalErrorException: bug2.cs(19,9):
<>c__CompilerGenerated1<BaseObject.T>.<2:results> --->
System.NullReferenceException: Object reference not set to an instance of an
object
  at Mono.CSharp.TypeContainer.get_BaseCache () [0x00000] 
  at Mono.CSharp.TypeContainer.FindBaseMemberWithSameName (System.String name,
Boolean ignore_methods) [0x00000] 
  at Mono.CSharp.FieldBase.CheckBase () [0x00000] 
  at Mono.CSharp.FieldBase.Define () [0x00000] 
  at Mono.CSharp.Field.Define () [0x00000] 
  at Mono.CSharp.TypeContainer+MemberCoreArrayList.DefineContainerMembers ()
[0x00000] --- End of inner exception stack trace ---

  at Mono.CSharp.TypeContainer+MemberCoreArrayList.DefineContainerMembers ()
[0x00000] 
  at Mono.CSharp.TypeContainer.DefineContainerMembers
(Mono.CSharp.MemberCoreArrayList mcal) [0x00000] 
  at Mono.CSharp.Class.DefineContainerMembers (Mono.CSharp.MemberCoreArrayList
list) [0x00000] 
  at Mono.CSharp.TypeContainer.DoDefineMembers () [0x00000] 
  at Mono.CSharp.Class.DoDefineMembers () [0x00000] 
  at Mono.CSharp.CompilerGeneratedClass.DoDefineMembers () [0x00000] 
  at Mono.CSharp.ScopeInfo.DoDefineMembers () [0x00000] 
  at Mono.CSharp.TypeContainer.DefineMembers () [0x00000] 
  at Mono.CSharp.TypeContainer.EmitType () [0x00000] 
  at Mono.CSharp.RootContext.EmitCode () [0x00000] 
  at Mono.CSharp.Driver.MainDriver (System.String[] args) [0x00000] 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000]


-- 
Configure bugmail: https://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