2002-09-18 Miguel de Icaza <miguel@ximian.com>
authorMiguel de Icaza <miguel@gnome.org>
Wed, 18 Sep 2002 23:47:26 +0000 (23:47 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Wed, 18 Sep 2002 23:47:26 +0000 (23:47 -0000)
* ecore.cs (SimpleName.DoResolveType): During the initial type
resolution process, when we define types recursively, we must
check first for types in our current scope before we perform
lookups in the enclosing scopes.

svn path=/trunk/mcs/; revision=7596

mcs/mcs/ChangeLog
mcs/mcs/ecore.cs

index e83a4c0a246801964368384c973e4424c6c33d67..f0f215e0b29361a80ad450fa87eda798648775ed 100755 (executable)
@@ -1,5 +1,10 @@
 2002-09-18  Miguel de Icaza  <miguel@ximian.com>
 
+       * ecore.cs (SimpleName.DoResolveType): During the initial type
+       resolution process, when we define types recursively, we must
+       check first for types in our current scope before we perform
+       lookups in the enclosing scopes.
+
        * expression.cs (MakeByteBlob): Handle Decimal blobs.
 
        (Invocation.VerifyArgumentsCompat): Call
index d7fa1d0196aeb976127636f9229e5e7fec0f5d62..9c64e62d36473af739213774e213fd9005f24f7f 100755 (executable)
@@ -3438,9 +3438,16 @@ namespace Mono.CSharp {
                        Type t;
                        string alias_value;
 
+                       if (ec.ResolvingTypeTree){
+                               Type dt = ec.DeclSpace.FindType (Name);
+                               if (dt != null)
+                                       return new TypeExpr (dt, loc);
+                       }
+
                        if ((t = RootContext.LookupType (ds, Name, true, loc)) != null)
                                return new TypeExpr (t, loc);
                                
+
                        //
                        // Stage 2 part b: Lookup up if we are an alias to a type
                        // or a namespace.
@@ -3459,12 +3466,6 @@ namespace Mono.CSharp {
                                return new SimpleName (alias_value, loc);
                        }
                                
-                       if (ec.ResolvingTypeTree){
-                               Type dt = ec.DeclSpace.FindType (Name);
-                               if (dt != null)
-                                       return new TypeExpr (dt, loc);
-                       }
-
                        // No match, maybe our parent can compose us
                        // into something meaningful.
                        return this;