[svn] r7060: nemerle/trunk/ncc: testsuite/positive/names-lookup.n typing/TyVarEnv.n

malekith svnadmin at nemerle.org
Wed Dec 6 17:04:52 CET 2006


Log:
Make poors_man_lookup() work proeprly in namespaces too. Resolves #712.

Author: malekith
Date: Wed Dec  6 17:04:51 2006
New Revision: 7060

Modified:
   nemerle/trunk/ncc/testsuite/positive/names-lookup.n
   nemerle/trunk/ncc/typing/TyVarEnv.n

Modified: nemerle/trunk/ncc/testsuite/positive/names-lookup.n
==============================================================================
--- nemerle/trunk/ncc/testsuite/positive/names-lookup.n	(original)
+++ nemerle/trunk/ncc/testsuite/positive/names-lookup.n	Wed Dec  6 17:04:51 2006
@@ -241,6 +241,15 @@
 }
 }
 
+namespace Bug712b {
+    public class A['a] {
+        class B : System.IComparable[A['a].B] {
+            public CompareTo (_ : B) : int {
+                0
+            }
+        }
+    }
+}
 
 /*
 REFERENCE: names-lookup-lib.dll

Modified: nemerle/trunk/ncc/typing/TyVarEnv.n
==============================================================================
--- nemerle/trunk/ncc/typing/TyVarEnv.n	(original)
+++ nemerle/trunk/ncc/typing/TyVarEnv.n	Wed Dec  6 17:04:51 2006
@@ -182,7 +182,8 @@
     poors_man_lookup_member (ti : TypeInfo, name : string) : list [IMember]
     {
       def loop (acc = [name], ti = ti) {
-        if (ti == null) acc
+        if (ti.DeclaringType == null)
+          ti.FullName.Split ('.').ToList () + acc
         else loop (ti.Name :: acc, ti.DeclaringType)
       }
       match (Manager.NameTree.LookupExactType (loop ())) {



More information about the svn mailing list