[Mono-bugs] [Bug 58584][Nor] New - mcs cannot recognize interface in other class when implementing with explicit interface name

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 16 May 2004 18:08:31 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by atsushi@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=58584

--- shadow/58584	2004-05-16 18:08:31.000000000 -0400
+++ shadow/58584.tmp.572	2004-05-16 18:08:31.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 58584
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: atsushi@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs cannot recognize interface in other class when implementing with explicit interface name
+
+When an interface is in another class, mcs cannot recognize
+explicitly-specified that interface name on implementation code.
+
+using System;
+
+// Without namespace, this error does not happen.
+namespace MyTest
+{
+	public class Test
+	{
+		public interface Inner
+		{
+			void Foo ();
+		}
+	}
+
+	public class Test2 : MarshalByRefObject, Test.Inner
+	{
+		// This is OK: public void Foo ()
+		void Test.Inner.Foo ()
+		{
+		}
+	}
+}
+
+csc allows it, while mcs rejects it:
+
+interface.cs(17) error CS0246: Cannot find type `Test.Inner'
+Compilation failed: 1 error(s), 0 warnings