Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@novell.com>2007-11-01 17:42:24 +0300
committerLluis Sanchez <lluis@novell.com>2007-11-01 17:42:24 +0300
commit99b2538bfaedb9b1690a4f4f25aec74eb0b4646a (patch)
treecff422d9c4a9d96cf19aba8166617d6b2af2e2b7
parentf02f4c73a143e306e00a7f3ed5430f831d4a2a08 (diff)
2007-11-01 Lluis Sanchez Gual <lluis@novell.com> monodevelop-0.17
* Parser/Resolver.cs: Restore IsAsResolve logic. Is/as are used for downcasting, so it only makes sense to return subclasses of the provided type. svn path=/branches/monodevelop/0.17/; revision=88649
-rw-r--r--Extras/CSharpBinding/ChangeLog6
-rw-r--r--Extras/CSharpBinding/Parser/Resolver.cs31
2 files changed, 21 insertions, 16 deletions
diff --git a/Extras/CSharpBinding/ChangeLog b/Extras/CSharpBinding/ChangeLog
index 88a3ce4824..67d4717260 100644
--- a/Extras/CSharpBinding/ChangeLog
+++ b/Extras/CSharpBinding/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-01 Lluis Sanchez Gual <lluis@novell.com>
+
+ * 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 <mhutchinson@novell.com>
* Gui/CSharpTextEditorExtension.cs: Don't try to look back past first
diff --git a/Extras/CSharpBinding/Parser/Resolver.cs b/Extras/CSharpBinding/Parser/Resolver.cs
index e02f63f274..271fa7e609 100644
--- a/Extras/CSharpBinding/Parser/Resolver.cs
+++ b/Extras/CSharpBinding/Parser/Resolver.cs
@@ -1227,22 +1227,21 @@ namespace CSharpBinding.Parser
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);