Author: lluis
Date: 2007-11-01 09:42:24 -0500 (Thu, 01 Nov 2007)
New Revision: 88649

Modified:
   branches/monodevelop/0.17/Extras/CSharpBinding/ChangeLog
   branches/monodevelop/0.17/Extras/CSharpBinding/Parser/Resolver.cs
Log:
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.



Modified: branches/monodevelop/0.17/Extras/CSharpBinding/ChangeLog
===================================================================
--- branches/monodevelop/0.17/Extras/CSharpBinding/ChangeLog    2007-11-01 
14:40:50 UTC (rev 88648)
+++ branches/monodevelop/0.17/Extras/CSharpBinding/ChangeLog    2007-11-01 
14:42:24 UTC (rev 88649)
@@ -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: branches/monodevelop/0.17/Extras/CSharpBinding/Parser/Resolver.cs
===================================================================
--- branches/monodevelop/0.17/Extras/CSharpBinding/Parser/Resolver.cs   
2007-11-01 14:40:50 UTC (rev 88648)
+++ branches/monodevelop/0.17/Extras/CSharpBinding/Parser/Resolver.cs   
2007-11-01 14:42:24 UTC (rev 88649)
@@ -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

Reply via email to