[Mono-bugs] [Bug 77963][Nor] New - [GMCS] NRE on class X : Y<X.Z> - derived class of a generic type whose generic argument is its nested child class

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Mar 30 15:11:59 EST 2006


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=77963

--- shadow/77963	2006-03-30 15:11:59.000000000 -0500
+++ shadow/77963.tmp.27938	2006-03-30 15:11:59.000000000 -0500
@@ -0,0 +1,56 @@
+Bug#: 77963
+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] NRE on class X : Y<X.Z> - derived class of a generic type whose generic argument is its nested child class
+
+The example code below causes NullReferenceException due to incomplete type
+resolution. Bar is derived from a generic class whose generic argument is
+the nested child class of Bar (i.e. Bar.Baz).
+
+public class Foo<K>
+{
+}
+
+public class Bar : Foo<Bar.Baz>
+{
+        public class Baz
+        {
+        }
+}
+
+
+Actual Results:
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x00169> Mono.CSharp.TypeContainer:DoDefineMembers ()
+in <0x0004a> Mono.CSharp.TypeContainer:DefineMembers ()
+in <0x0023f> Mono.CSharp.RootContext:PopulateTypes ()
+in <0x00e23> Mono.CSharp.Driver:MainDriver (System.String[] args)
+in <0x00056> Mono.CSharp.Driver:Main (System.String[] args)
+
+Expected Results:
+
+no such error.
+
+How often does this happen? 
+
+consistently.
+
+Additional Information:
+
+This blocks a production-ready game SDK library which works with mono.
+http://yanesdkdotnet.sourceforge.jp/ , src/draw/BitmapLoader.cs


More information about the mono-bugs mailing list