[Mono-list] Possible semantics difference between mcs and csc

Artur Karazniewicz karaznie@acn.waw.pl
Wed, 01 Jan 2003 11:36:27 +0100


I'm working on getting nant to work on linux with mono
(nant 0.6 included in mono/mcs). I've found possible
semantics difference between mcs (if mono's nant-0.6 works
on windows). The difference is:

ValidatorAttribute[] validators = 

this probably works on windows (mcs). This is strange a bit - since
Attribute.GetCustomAttributes returns Attribute[] - and
looks like mcs/.NET casts Attribute[] to ValidatorAttribute[]
(I'm new to C# - i'm not sure maybe this type of cast
is allowed in .NET - i mean mcs/.NET casts all elements of array
of Attribute to array of subtype of Attribyte (ValidatorAttribute in 
this case)). mcs/mono throws   System.InvalidCastException.

Good news is that almost all nant tasks works on linux. Bad is
that mcs compiler task does not work - yet :).

regards and happy new year,