--- /dev/null
+// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression
+// Line: 18
+
+using System;
+
+enum E
+{
+ Value
+}
+
+class AAttribute : Attribute
+{
+ public AAttribute (Enum e)
+ {
+ }
+}
+
+[A (E.Value)]
+class Test
+{
+}
\ No newline at end of file
public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
{
+ // Only boxing to object type is supported
+ if (targetType != TypeManager.object_type) {
+ base.EncodeAttributeValue (rc, enc, targetType);
+ return;
+ }
+
enc.Encode (child.Type);
child.EncodeAttributeValue (rc, enc, child.Type);
}