[Mono-bugs] [Bug 63141][Nor] New - mcs crashes when array initializer is used for non-array type
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 16 Aug 2004 08:28:26 -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 colin@breame.com.
http://bugzilla.ximian.com/show_bug.cgi?id=63141
--- shadow/63141 2004-08-16 08:28:26.000000000 -0400
+++ shadow/63141.tmp.15957 2004-08-16 08:28:26.000000000 -0400
@@ -0,0 +1,41 @@
+Bug#: 63141
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details: Gentoo
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: colin@breame.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mcs crashes when array initializer is used for non-array type
+
+using 1.0.1:
+
+public class A {
+ A test = {
+ new A()
+ };
+}
+
+Produces:
+$ mcs test.cs
+Unhandled Exception: System.NotSupportedException: Operation is not supported.
+in <0x00024> System.Type:GetArrayRank ()
+in <0x00182> Mono.CSharp.ArrayCreation:LookupType (Mono.CSharp.EmitContext)
+in <0x0005e> Mono.CSharp.ArrayCreation:DoResolve (Mono.CSharp.EmitContext)
+in <0x000d5> Mono.CSharp.FieldBase:GetInitializerExpression
+(Mono.CSharp.EmitContext)
+in <0x00115> Mono.CSharp.TypeContainer:EmitFieldInitializers
+(Mono.CSharp.EmitContext)
+in <0x00388> Mono.CSharp.Constructor:Emit (Mono.CSharp.TypeContainer)
+in <0x00427> Mono.CSharp.TypeContainer:Emit ()
+in <0x00896> Mono.CSharp.RootContext:EmitCode ()
+in <0x00c35> Mono.CSharp.Driver:MainDriver (string[])
+in <0x00012> Mono.CSharp.Driver:Main (string[])