Author: martin
Date: 2006-07-21 09:03:05 -0400 (Fri, 21 Jul 2006)
New Revision: 62856
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/ecore.cs
Log:
2006-07-21 Martin Baulig <[EMAIL PROTECTED]>
* ecore.cs (SimpleName.DoSimpleNameResolve): Added CS0307 check.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2006-07-21 12:21:08 UTC (rev 62855)
+++ trunk/mcs/gmcs/ChangeLog 2006-07-21 13:03:05 UTC (rev 62856)
@@ -1,3 +1,7 @@
+2006-07-21 Martin Baulig <[EMAIL PROTECTED]>
+
+ * ecore.cs (SimpleName.DoSimpleNameResolve): Added CS0307 check.
+
2006-07-20 Miguel de Icaza <[EMAIL PROTECTED]>
* anonymous.cs: Cache the resolved anonymous delegate, and return
Modified: trunk/mcs/gmcs/ecore.cs
===================================================================
--- trunk/mcs/gmcs/ecore.cs 2006-07-21 12:21:08 UTC (rev 62855)
+++ trunk/mcs/gmcs/ecore.cs 2006-07-21 13:03:05 UTC (rev 62856)
@@ -2123,6 +2123,13 @@
if (current_block != null){
LocalInfo vi = current_block.GetLocalInfo
(Name);
if (vi != null){
+ if (Arguments != null) {
+ Report.Error (307, loc,
+ "The variable
`{0}' cannot be used with type arguments",
+ Name);
+ return null;
+ }
+
LocalVariableReference var = new
LocalVariableReference (ec.CurrentBlock, Name, loc);
if (right_side != null) {
return var.ResolveLValue (ec,
right_side, loc);
@@ -2136,6 +2143,13 @@
ParameterReference pref =
current_block.Toplevel.GetParameterReference (Name, loc);
if (pref != null) {
+ if (Arguments != null) {
+ Report.Error (307, loc,
+ "The variable
`{0}' cannot be used with type arguments",
+ Name);
+ return null;
+ }
+
if (right_side != null)
return pref.ResolveLValue (ec,
right_side, loc);
else
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches