Bug 317916 (MONO74864) - [GMCS]: NullReferenceException when compiling erroneous generic method
Summary: [GMCS]: NullReferenceException when compiling erroneous generic method
Status: RESOLVED FIXED
Alias: MONO74864
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-07 21:07 UTC by Ivo Kasiuk
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:16:10 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".