Bugzilla – Bug 317916
[GMCS]: NullReferenceException when compiling erroneous generic method
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by i.kasiuk@ngi.de 2005-05-07 14:07:10 MST ---- Compile the following code with gmcs: ----------------------------------------------- class Test { void f<T>(T t) where T : T1 { } public static void Main() { } } ----------------------------------------------- This shouldn't compile as T1 is undefinded. But I didn't expect gmcs to throw an exception: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object in <0x0001c> Mono.CSharp.Method:Emit () in <0x00685> Mono.CSharp.TypeContainer:EmitType () in <0x00249> Mono.CSharp.RootContext:EmitCode () in <0x00bd3> Mono.CSharp.Driver:MainDriver (System.String[] args) in <0x0001f> Mono.CSharp.Driver:Main (System.String[] args) Expected Results: error message How often does this happen? always ---- Additional Comments From martin@ximian.com 2005-05-10 13:29:09 MST ---- Fixed in SVN. Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>FC3 x86_64 on AMD64</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".