[Mono-bugs] [Bug 72975][Blo] New - Illegal CS0182 error.
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 24 Feb 2005 12:50:37 -0500 (EST)
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 alexfh@mail.ru.
http://bugzilla.ximian.com/show_bug.cgi?id=72975
--- shadow/72975 2005-02-24 12:50:37.000000000 -0500
+++ shadow/72975.tmp.8674 2005-02-24 12:50:37.000000000 -0500
@@ -0,0 +1,60 @@
+Bug#: 72975
+Product: Mono: Compilers
+Version: 1.1
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Blocker
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: alexfh@mail.ru
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Illegal CS0182 error.
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+CS0182 appears when it shouldn't.
+
+Steps to reproduce the problem:
+1. create test.cs with the following contents:
+using System;
+
+[AttributeUsage(AttributeTargets.Property)]
+public sealed class TestAttribute : Attribute {
+ public TestAttribute(long testParam) {
+ testParam = testParam;
+ }
+}
+
+public class ConsoleApp {
+ [Test(0)]
+ public int TestProp {
+ get { return 0; }
+ }
+
+ public static void Main(string[] args) {
+ System.Console.WriteLine("Hello, world!");
+ }
+}
+
+2. mcs test.cs
+
+Actual Results:
+test.cs(15) error CS0182: An attribute argument must be a constant
+expression, typeof expression or array creation expression
+
+
+Expected Results:
+normal compilation
+
+How often does this happen?
+100% repro on sample source
+
+Additional Information:
+mono version 1.1.4