Author: lluis
Date: 2007-11-01 09:40:50 -0500 (Thu, 01 Nov 2007)
New Revision: 88648
Modified:
trunk/monodevelop/Extras/CSharpBinding/ChangeLog
trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs
Log:
* Parser/Resolver.cs: Restore IsAsResolve logic. Is/as are used for
downcasting, so it only makes sense to return subclasses of the
provided type.
Modified: trunk/monodevelop/Extras/CSharpBinding/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-11-01 14:38:50 UTC
(rev 88647)
+++ trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-11-01 14:40:50 UTC
(rev 88648)
@@ -1,3 +1,9 @@
+2007-11-01 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * Parser/Resolver.cs: Restore IsAsResolve logic. Is/as are used for
+ downcasting, so it only makes sense to return subclasses of the
provided
+ type.
+
2007-10-29 Michael Hutchinson <[EMAIL PROTECTED]>
* Gui/CSharpTextEditorExtension.cs: Don't try to look back past first
Modified: trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs 2007-11-01
14:38:50 UTC (rev 88647)
+++ trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs 2007-11-01
14:40:50 UTC (rev 88648)
@@ -1227,23 +1227,22 @@
if (currentUnit != null) {
callingClass = GetInnermostClass ();
}
- IReturnType type = new ReturnType ("System.Object");
-// IReturnType type = expr.AcceptVisitor (typeVisitor,
null) as IReturnType;
-// if (type == null || type.PointerNestingLevel != 0) {
-// fcu = parserContext.ParseFile (fileName,
fileContent).MostRecentCompilationUnit.Tag as
ICSharpCode.NRefactory.Ast.CompilationUnit;
-// lookupTableVisitor.VisitCompilationUnit (fcu,
null);
-// currentUnit =
(ICompilationUnit)csharpVisitor.VisitCompilationUnit (fcu, null);
-//
-// if (currentUnit != null) {
-// callingClass = GetInnermostClass ();
-// }
-// type = expr.AcceptVisitor (typeVisitor, null)
as IReturnType;
-// if (type == null)
-// return null;
-// }
-// if (type.ArrayDimensions != null &&
type.ArrayDimensions.Length > 0)
-// type = new ReturnType ("System.Array");
+ IReturnType type = expr.AcceptVisitor (typeVisitor,
null) as IReturnType;
+ if (type == null || type.PointerNestingLevel != 0) {
+ fcu = parserContext.ParseFile (fileName,
fileContent).MostRecentCompilationUnit.Tag as
ICSharpCode.NRefactory.Ast.CompilationUnit;
+ lookupTableVisitor.VisitCompilationUnit (fcu,
null);
+ currentUnit =
(ICompilationUnit)csharpVisitor.VisitCompilationUnit (fcu, null);
+ if (currentUnit != null) {
+ callingClass = GetInnermostClass ();
+ }
+ type = expr.AcceptVisitor (typeVisitor, null)
as IReturnType;
+ if (type == null)
+ return null;
+ }
+ if (type.ArrayDimensions != null &&
type.ArrayDimensions.Length > 0)
+ type = new ReturnType ("System.Array");
+
IClass returnClass = SearchType (type, currentUnit);
// IClass returnClass = parserContext.SearchType
(type.FullyQualifiedName, null, currentUnit);
if (returnClass == null)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches