[Mono-bugs] [Bug 76365][Nor] New - [GMCS] partial type does not
allow such base type that has generic where clause
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Oct 7 15:11:57 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by atsushi at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=76365
--- shadow/76365 2005-10-07 15:11:57.000000000 -0400
+++ shadow/76365.tmp.24679 2005-10-07 15:11:57.000000000 -0400
@@ -0,0 +1,62 @@
+Bug#: 76365
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: atsushi at ximian.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [GMCS] partial type does not allow such base type that has generic where clause
+
+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.
More information about the mono-bugs
mailing list