[Mono-bugs] [Bug 60333][Nor] New - mcs reports error CS0182 when casting a constant value in attribute

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 17 Jun 2004 03:07:19 -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 gert.driesen@pandora.be.

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

--- shadow/60333	2004-06-17 03:07:19.000000000 -0400
+++ shadow/60333.tmp.11995	2004-06-17 03:07:19.000000000 -0400
@@ -0,0 +1,31 @@
+Bug#: 60333
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gert.driesen@pandora.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs reports error CS0182 when casting a constant value in attribute
+
+mcs reports error CS0182 (An attribute argument must be a constant 
+expression, typeof expression or array creation expression) when 
+compiling the following code fragment :
+
+using System.Runtime.InteropServices;
+
+public interface ITest
+{
+  int Next ([MarshalAs (UnmanagedType.LPArray, ArraySubType = 
+(UnmanagedType) 80, SizeParamIndex = 0)] int[] rgelt);
+}
+
+This compiles fine using csc.