[Mono-bugs] [Bug 44679][Nor] New - "using Foo = Bar; Foo[] a;" fails to compile

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Thu, 12 Jun 2003 21:48:51 -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 timsuth@ihug.co.nz.

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

--- shadow/44679	Thu Jun 12 21:48:51 2003
+++ shadow/44679.tmp.15457	Thu Jun 12 21:48:51 2003
@@ -0,0 +1,35 @@
+Bug#: 44679
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: timsuth@ihug.co.nz               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: "using Foo = Bar; Foo[] a;" fails to compile
+
+For the following code, mcs (0.23.0.0, debianplanet package on woody) fails
+to compile. Microsoft's csc does compile it.
+
+The error given is "foo.cs(5) error CS0246: Cannot find type `Type[]'"
+
+-------------
+using Type = System.Int32;
+public class Foo {
+	public static void Main(string[] args) {
+		Type a; // works
+		Type[] b; // fails
+	}
+}
+-------------
+
+Additionally, "using Type2 = System.Int32[]" gives a parse error, but I
+haven't checked if this works in csc.