[Mono-bugs] [Bug 73023][Min] New - [GMCS] Partial classes do not work with generic parameters

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 25 Feb 2005 06:54:51 -0500 (EST)


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 nazgul@omega.pl.

http://bugzilla.ximian.com/show_bug.cgi?id=73023

--- shadow/73023	2005-02-25 06:54:51.000000000 -0500
+++ shadow/73023.tmp.29158	2005-02-25 06:54:51.000000000 -0500
@@ -0,0 +1,78 @@
+Bug#: 73023
+Product: Mono: Compilers
+Version: 1.0
+OS: 
+OS Details: Mandrake 10.1 mono 1.1.4.20040221svn
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: nazgul@omega.pl               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] Partial classes do not work with generic parameters
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+When you specify generic parameter in partial classes, gmcs crashes.
+
+Steps to reproduce the problem:
+1. Try to compile following program
+
+
+namespace B
+{
+  partial class Test <T>
+	{ }
+}
+
+namespace B
+{
+	partial class Test <T>
+	{
+	}
+}
+
+
+class X
+{
+	static void Main ()
+	{ }
+}
+
+
+
+Actual Results:
+Unhandled Exception: System.InvalidOperationException: Operation is not
+valid due to the current state of the object
+in <0x0003d> System.Type:GetGenericTypeDefinition ()
+in <0x00016> System.Reflection.Emit.TypeBuilder:GetGenericTypeDefinition ()
+in <0x002d8> Mono.CSharp.ConstructedType:ResolveConstructedType
+(Mono.CSharp.EmitContext ec)
+in <0x00010> Mono.CSharp.ConstructedType:DoResolveAsTypeStep
+(Mono.CSharp.EmitContext ec)
+in <0x00011> Mono.CSharp.TypeExpr:ResolveAsTypeStep
+(Mono.CSharp.EmitContext ec)
+in <0x00029> Mono.CSharp.Expression:ResolveAsTypeTerminal
+(Mono.CSharp.EmitContext ec)
+in <0x0000d> Mono.CSharp.ConstructedType:ResolveAsTypeTerminal
+(Mono.CSharp.EmitContext ec)
+in <0x009c6> Mono.CSharp.TypeContainer:DefineType ()
+in <0x0039a> Mono.CSharp.RootContext:ResolveTree ()
+in <0x00b09> Mono.CSharp.Driver:MainDriver (System.String[] args)
+in <0x0001f> Mono.CSharp.Driver:Main (System.String[] args)
+
+
+Expected Results:
+Compilation succeeded.
+
+How often does this happen? 
+Always
+
+Additional Information:
+on csc beta1 it works fine