Bug 317301 (MONO73023) - [GMCS] Partial classes do not work with generic parameters
Summary: [GMCS] Partial classes do not work with generic parameters
Status: RESOLVED FIXED
Alias: MONO73023
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.0
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-25 13:54 UTC by Kamil Skalski
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:08:50 UTC


---- Reported by nazgul@omega.pl 2005-02-25 06:54:50 MST ----

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



---- Additional Comments From martin@ximian.com 2005-03-02 12:02:05 MST ----

Will be fixed today or on Friday; almost done with it.



---- Additional Comments From martin@ximian.com 2005-03-02 12:57:23 MST ----

Fixed in SVN; added gen-129.cs.


Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>Mandrake 10.1 mono 1.1.4.20040221svn</cf_op_sys_details>
Unknown operating system unknown. Setting to default OS "Other".