Author: martin
Date: 2005-04-22 13:51:29 -0400 (Fri, 22 Apr 2005)
New Revision: 43454
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/generic.cs
Log:
2005-04-22 Martin Baulig <[EMAIL PROTECTED]>
* generic.cs (GenericMethod): Create the EmitContext in the
`Define()'; in `Define(MethodBuilder)', create the type parameters
before calling `Define()'. Fixes #73933.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2005-04-22 17:51:22 UTC (rev 43453)
+++ trunk/mcs/gmcs/ChangeLog 2005-04-22 17:51:29 UTC (rev 43454)
@@ -1,5 +1,11 @@
2005-04-22 Martin Baulig <[EMAIL PROTECTED]>
+ * generic.cs (GenericMethod): Create the EmitContext in the
+ `Define()'; in `Define(MethodBuilder)', create the type parameters
+ before calling `Define()'. Fixes #73933.
+
+2005-04-22 Martin Baulig <[EMAIL PROTECTED]>
+
* generic.cs
(Constraints.Resolve): Make things work wrt. the new type lookup system.
(ConstructedType.ResolveAsTypeTerminal): Don't override this.
Modified: trunk/mcs/gmcs/generic.cs
===================================================================
--- trunk/mcs/gmcs/generic.cs 2005-04-22 17:51:22 UTC (rev 43453)
+++ trunk/mcs/gmcs/generic.cs 2005-04-22 17:51:29 UTC (rev 43454)
@@ -1410,8 +1410,10 @@
public override bool Define ()
{
+ ec = new EmitContext (this, this, Location, null, null,
ModFlags, false);
+
for (int i = 0; i < TypeParameters.Length; i++)
- if (!TypeParameters [i].Resolve (Parent))
+ if (!TypeParameters [i].Resolve (this))
return false;
return true;
@@ -1419,16 +1421,14 @@
public bool Define (MethodBuilder mb)
{
- if (!Define ())
- return false;
-
GenericTypeParameterBuilder[] gen_params;
string[] names =
MemberName.TypeArguments.GetDeclarations ();
gen_params = mb.DefineGenericParameters (names);
for (int i = 0; i < TypeParameters.Length; i++)
TypeParameters [i].Define (gen_params [i]);
- ec = new EmitContext (this, this, Location, null, null,
ModFlags, false);
+ if (!Define ())
+ return false;
for (int i = 0; i < TypeParameters.Length; i++) {
if (!TypeParameters [i].ResolveType (ec))
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches