Bug 319226 (MONO76365) - [GMCS] partial type does not allow such base type that has generic where clause
Summary: [GMCS] partial type does not allow such base type that has generic where clause
Status: RESOLVED FIXED
Alias: MONO76365
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-10-07 22:11 UTC by Atsushi Enomoto
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:33:52 UTC


---- Reported by atsushi@ximian.com 2005-10-07 15:11:57 MST ----

The code below crashes gmcs:

--------
public class R {}
public class A<T> where T : R {}
public partial class D : A<R> {}
--------

Unhandled Exception: System.NullReferenceException: Object reference not
set to an instance of an object
in [0x0015f] (at C:\cygwin\home\atsushi\svn\mcs\gmcs\generic.cs:1373)
Mono.CSharp.ConstructedType:CheckConstraints (Mono.CSharp.EmitContext ec,
Int32 index)
in [0x0000a] (at C:\cygwin\home\atsushi\svn\mcs\gmcs\generic.cs:1435)
Mono.CSharp.ConstructedType:CheckConstraints (Mono.CSharp.EmitContext ec)
in [0x00094] (at C:\cygwin\home\atsushi\svn\mcs\gmcs\ecore.cs:273)
Mono.CSharp.Expression:ResolveAsTypeTerminal (Mono.CSharp.EmitContext ec,
Boolean silent)
in [0x00003] (at C:\cygwin\home\atsushi\svn\mcs\gmcs\ecore.cs:247)
Mono.CSharp.Expression:ResolveAsTypeTerminal (Mono.CSharp.EmitContext ec)
in [0x00002] (at C:\cygwin\home\atsushi\svn\mcs\gmcs\ecore.cs:2279)
Mono.CSharp.TypeExpr:ResolveType (Mono.CSharp.EmitContext ec)
in [0x0036b] (at C:\cygwin\home\atsushi\svn\mcs\gmcs\class.cs:1312)
Mono.CSharp.TypeContainer:DefineType ()
in [0x0007f] (at C:\cygwin\home\atsushi\svn\mcs\gmcs\rootcontext.cs:176)
Mono.CSharp.RootContext:ResolveTree ()
in [0x00529] (at C:\cygwin\home\atsushi\svn\mcs\gmcs\driver.cs:1593)
Mono.CSharp.Driver:MainDriver (System.String[] args)
in [0x00020] (at C:\cygwin\home\atsushi\svn\mcs\gmcs\driver.cs:289)
Mono.CSharp.Driver:Main (System.String[] args)


Expected Results:

no error (except for "entrypoint not found").

How often does this happen? 

consistently.

Additional Information:

- It does not happen when we remove "partial" modifier.
- It does not happen when we remove "where" clause.



---- Additional Comments From martin@ximian.com 2005-10-19 14:01:38 MST ----

Fixed in SVN.


Unknown operating system unknown. Setting to default OS "Other".