Author: lluis
Date: 2007-05-23 10:45:34 -0400 (Wed, 23 May 2007)
New Revision: 77838
Modified:
trunk/monodevelop/Extras/CSharpBinding/ChangeLog
trunk/monodevelop/Extras/CSharpBinding/Parser/TypeVisitor.cs
Log:
* Parser/TypeVisitor.cs: When resolving an identifier, look first in
class members, then look for types. Fixes bug #81542.
Modified: trunk/monodevelop/Extras/CSharpBinding/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-05-23 14:38:40 UTC
(rev 77837)
+++ trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-05-23 14:45:34 UTC
(rev 77838)
@@ -1,3 +1,8 @@
+2007-05-23 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * Parser/TypeVisitor.cs: When resolving an identifier, look first in
+ class members, then look for types. Fixes bug #81542.
+
2007-05-21 Jeffrey Stedfast <[EMAIL PROTECTED]>
* Gui/CSharpTextEditorExtension.cs (KeyPress): If a region of text
Modified: trunk/monodevelop/Extras/CSharpBinding/Parser/TypeVisitor.cs
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/Parser/TypeVisitor.cs
2007-05-23 14:38:40 UTC (rev 77837)
+++ trunk/monodevelop/Extras/CSharpBinding/Parser/TypeVisitor.cs
2007-05-23 14:45:34 UTC (rev 77838)
@@ -277,6 +277,11 @@
if (identifierExpression == null) {
return null;
}
+
+ object ob =
resolver.DynamicLookup(identifierExpression.Identifier);
+ if (ob != null)
+ return ob;
+
string name = resolver.SearchNamespace
(identifierExpression.Identifier, resolver.CompilationUnit);
if (name != null)
return new ReturnType (name);
@@ -293,7 +298,7 @@
resolver.ShowStatic = true;
return new ReturnType(c.FullyQualifiedName);
}
- return
resolver.DynamicLookup(identifierExpression.Identifier);
+ return null;
}
public override object Visit(TypeReferenceExpression
typeReferenceExpression, object data)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches