[mcs] Remove not implemented from ambiguous static type lookup. Fixes #33527
authorMarek Safar <marek.safar@gmail.com>
Tue, 1 Sep 2015 09:09:35 +0000 (11:09 +0200)
committerMarek Safar <marek.safar@gmail.com>
Tue, 1 Sep 2015 09:16:08 +0000 (11:16 +0200)
mcs/mcs/namespace.cs
mcs/tests/test-static-using-11.cs [new file with mode: 0644]
mcs/tests/ver-il-net_4_x.xml

index 541466770e7e2bc8f1e00f6831f7177614354137..2639d046d1bfe1c8ce36790aab6a936847098688 100644 (file)
@@ -1177,7 +1177,7 @@ namespace Mono.CSharp {
                                                                continue;
 
                                                        if (mode == LookupMode.Normal)
-                                                               throw new NotImplementedException ();
+                                                               continue;
                                                        
                                                        return null;
                                                }
diff --git a/mcs/tests/test-static-using-11.cs b/mcs/tests/test-static-using-11.cs
new file mode 100644 (file)
index 0000000..25d19b8
--- /dev/null
@@ -0,0 +1,34 @@
+using static A;
+using static B;
+
+class A
+{
+       public class TestMe
+       {
+       }
+
+       public static int TestMe1 ()
+       {
+               return 0;
+       }
+}
+
+class B
+{
+       public static int TestMe2 ()
+       {
+               return 0;
+       }
+
+       public class TestMe1
+       {
+       }
+}
+
+class C
+{
+       public static void Main ()
+       {
+               new TestMe1 ();
+       }
+}
\ No newline at end of file
index 47cfe2ca4691486b451b208e33ce53565de8a80e..6143ce739f92e057ce2653642d9808bb7709477a 100644 (file)
       </method>
     </type>
   </test>
+  <test name="test-static-using-11.cs">
+    <type name="A">
+      <method name="Int32 TestMe1()" attrs="150">
+        <size>10</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+TestMe">
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Int32 TestMe2()" attrs="150">
+        <size>10</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B+TestMe1">
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void Main()" attrs="150">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-var-01.cs">
     <type name="Test">
       <method name="Int32 Main()" attrs="150">