Bugzilla – Bug 322026
[GMCS] Crash whilst resolving argument types in generic delegate
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by mike.allen@durrusa.com 2006-09-07 12:23:31 MST ---- Description of Problem: Get a NullReferenceException when compiling this simple example: test.cs: namespace Test { public delegate void Handler <TA> (TA sender) where TA: A <TA>; public class A <TA> where TA: A <TA> { } } Steps to reproduce the problem: 1. Compile the above using the command: gmcs -target:library -warn:4 -warnaserror test.cs Actual Results: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object in <0x000d7> Mono.CSharp.TypeArguments:Resolve (Mono.CSharp.EmitContext ec) in <0x00021> Mono.CSharp.ConstructedType:DoResolveType (Mono.CSharp.EmitContext ec) in <0x0012d> Mono.CSharp.ConstructedType:ResolveConstructedType (Mono.CSharp.EmitContext ec) in <0x0000e> Mono.CSharp.ConstructedType:DoResolveAsTypeStep (Mono.CSharp.EmitContext ec) in <0x00011> Mono.CSharp.TypeExpr:ResolveAsTypeStep (Mono.CSharp.EmitContext ec, Boolean silent) in <0x00010> Mono.CSharp.Expression:ResolveAsTypeStep (Mono.CSharp.EmitContext ec) in <0x00114> Mono.CSharp.SimpleName:ResolveAsTypeStep (Mono.CSharp.EmitContext ec, Boolean silent) in <0x00010> Mono.CSharp.Expression:ResolveAsTypeStep (Mono.CSharp.EmitContext ec) in <0x002e8> Mono.CSharp.Constraints:Resolve (Mono.CSharp.EmitContext ec) in <0x0002c> Mono.CSharp.TypeParameter:Resolve (Mono.CSharp.DeclSpace ds) in <0x00124> Mono.CSharp.Delegate:DefineType () in <0x0034f> Mono.CSharp.RootContext:ResolveTree () in <0x00974> Mono.CSharp.Driver:MainDriver (System.String[] args) in <0x00051> Mono.CSharp.Driver:Main (System.String[] args) Expected Results: Clean compile with no errors. How often does this happen? Every time. Additional Information: Compiles clean using Microsoft C# compiler. Looks similar to https://bugzilla.novell.com/show_bug.cgi?id=MONO79094, but I get different error. ---- Additional Comments From martin@ximian.com 2006-10-09 09:40:12 MST ---- *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO79094 *** Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Ubuntu 6.06</cf_op_sys_details> Unknown bug field "cf_version_details" encountered while moving bug <cf_version_details>1.1.13.6-0ubuntu3</cf_version_details> This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"