[Mono-bugs] [Bug 47853][Nor] New - invalid CS0246 with using a namespace of another file

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 24 Aug 2003 13:23:54 -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 japj@xs4all.nl.

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

--- shadow/47853	2003-08-24 13:23:54.000000000 -0400
+++ shadow/47853.tmp.2019	2003-08-24 13:23:54.000000000 -0400
@@ -0,0 +1,66 @@
+Bug#: 47853
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: japj@xs4all.nl               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: invalid CS0246 with using a namespace of another file
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+
+I have 2 files, one of them using a "using T1 = N1.C1;" and inheriting 
+from the T1 class which gives an invalid CS0246 error.
+
+I have two files:
+-------------------------------------
+n1.cs:
+-------------------------------------
+using System;
+
+namespace N1
+{
+	public class C1
+	{        
+		public static void f()
+		{
+			Console.WriteLine("f");
+		}
+	}
+}
+-------------------------------------
+test.cs:
+-------------------------------------
+using System;
+using T1 = N1.C1;
+
+namespace N2
+{
+	class Test : T1
+	{
+		static void Main()
+		{
+			Console.WriteLine("Test");
+			f();
+		}
+	}
+}
+-------------------------------------
+
+When I try to compile them with mcs(0.26) test.cs n1.cs I get a 
+
+test.cs(8) error CS0246: Cannot find type `T1'
+Compilation failed: 1 error(s), 0 warnings
+
+If I try to compile this with csc it goes ok.