Author: fejj
Date: 2007-05-25 11:57:25 -0400 (Fri, 25 May 2007)
New Revision: 77949
Modified:
trunk/monodevelop/Extras/CSharpBinding/ChangeLog
trunk/monodevelop/Extras/CSharpBinding/Parser/TypeVisitor.cs
Log:
2007-05-24 Jeffrey Stedfast <[EMAIL PROTECTED]>
* Parser/TypeVisitor.cs (Visit::IdentifierExpression): Scan parent
namespaces of the calling class as well. Fixes bug #81543.
Modified: trunk/monodevelop/Extras/CSharpBinding/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-05-25 15:40:53 UTC
(rev 77948)
+++ trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-05-25 15:57:25 UTC
(rev 77949)
@@ -1,3 +1,8 @@
+2007-05-24 Jeffrey Stedfast <[EMAIL PROTECTED]>
+
+ * Parser/TypeVisitor.cs (Visit::IdentifierExpression): Scan parent
+ namespaces of the calling class as well. Fixes bug #81543.
+
2007-05-23 Jeffrey Stedfast <[EMAIL PROTECTED]>
* Parser/CodeGenerator.cs (GetOptions): Override our base
Modified: trunk/monodevelop/Extras/CSharpBinding/Parser/TypeVisitor.cs
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/Parser/TypeVisitor.cs
2007-05-25 15:40:53 UTC (rev 77948)
+++ trunk/monodevelop/Extras/CSharpBinding/Parser/TypeVisitor.cs
2007-05-25 15:57:25 UTC (rev 77949)
@@ -291,6 +291,17 @@
name = resolver.SearchNamespace
(resolver.CallingClass.Namespace + "." + identifierExpression.Identifier,
resolver.CompilationUnit);
if (name != null)
return new ReturnType (name);
+
+ // check parent namespaces
+ string ns = resolver.CallingClass.Namespace;
+ int dot = ns.Length;
+
+ while (dot > 1 && (dot = ns.LastIndexOf ('.',
dot - 1)) != -1) {
+ name = ns.Substring (0, dot + 1) +
identifierExpression.Identifier;
+ name = resolver.SearchNamespace (name,
resolver.CompilationUnit);
+ if (name != null)
+ return new ReturnType (name);
+ }
}
IClass c =
resolver.SearchType(identifierExpression.Identifier, null,
resolver.CompilationUnit);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches