[Mono-list] ConditonalAttribute bug
Ravi Pratap M
ravi@ximian.com
Fri, 12 Sep 2003 12:33:50 -0500
Hi Sebastien,
> There's a bug in the Microsoft documentation which leaked in mono source code.
>
> In ConditionalAttribute.cs,
>
> [AttributeUsage(AttributeTargets.Method)]
>
> Should be
>
> [AttributeUsage(AttributeTargets.Method,AllowMultiple=true)]
>
> To reproduce the case, just try to compile the following:
>
> #define DEBUG
> #define TRACE
> public class Test
> {
> public static void Main(string args[])
> {
> WriteMe();
> }
>
> [Conditional("DEBUG"),Conditional("TRACE")]
> public static void WriteMe()
> {
> Console.WriteLine("This is me");
> }
> }
>
> The compiler is allowed to ignore the attribute, but at least it should compile it :)
Could you please file this as a bug on bugzilla.ximian.com ? I can take
care of it soon.
Ravi.