Bug 313431 (MONO52429) - attribute issue
Summary: attribute issue
Status: RESOLVED FIXED
Alias: MONO52429
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2003-12-21 23:41 UTC by Todd Berman
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
test2.cs (156 bytes, text/plain)
2003-12-21 23:41 UTC, Thomas Wiest
Details
XmlMemberArrayAttribute.cs (1.35 KB, text/plain)
2003-12-21 23:41 UTC, Thomas Wiest
Details
proposed patch (1.47 KB, patch)
2003-12-25 05:35 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:22:35 UTC


---- Reported by tberman@gentoo.org 2003-12-21 16:41:02 MST ----

take both files, compile together with mcs, you will get an error.

this works on csc without any issue.

(Note, im not sure if this example will completely compile, but you should
be able to get rid of the:

test2.cs(7) error CS0182: An attribute argument must be a constant
expression, typeof expression or array creation expression

error)



---- Additional Comments From tberman@gentoo.org 2003-12-21 16:41:21 MST ----

Created an attachment (id=165366)
test2.cs




---- Additional Comments From tberman@gentoo.org 2003-12-21 16:41:56 MST ----

Created an attachment (id=165367)
XmlMemberArrayAttribute.cs




---- Additional Comments From pcgod@gmx.net 2003-12-24 22:35:30 MST ----

Created an attachment (id=165368)
proposed patch




---- Additional Comments From pcgod@gmx.net 2003-12-24 22:38:41 MST ----

this patch works for me, but someone who knows more about mcs should 
look at it, if there is no better way to get the value of a cast 
expression (that case is not triggered by the provided testcase but 
it will be used if you change the type to for example long[]). It may 
also need the runtime change which is in #52451



---- Additional Comments From tberman@gentoo.org 2004-01-03 18:22:13 MST ----

fixed in cvs

Imported an attachment (id=165366)
Imported an attachment (id=165367)
Imported an attachment (id=165368)

Unknown operating system unknown. Setting to default OS "Other".