[Mono-dev] smcs issue

olivier dufour olivier.duff at gmail.com
Mon Sep 15 13:30:10 EDT 2008


Since Microsoft have release of silverlight 2 beta2, I try to work again on
silverlight javascript compiler.
The issue, I have is that if I compare with gui-compare the microsoft dll
and my dll (olive/class/Microsoft.Jscript.Runtime) I see that they do a
static class named ConcatStringOps which contain all operator of
ConcatString class.
The issue is that the smcs compiler do not allow that:

Microsoft.JScript.Runtime/ConcatStringOps.cs(36,44): error CS0715:
`Microsoft.JScript.Runtime.ConcatStringOps.operator +(ConcatString,
JSBooleanObject)': Static classes cannot contain user-defined operators
Microsoft.JScript.Runtime/ConcatStringOps.cs(36,44): error CS0563: One of
the parameters of a binary operator must be the containing type

So maybe microsoft have change a bit the silverlight compiler to
here is the snipset:
namespace Microsoft.JScript.Runtime
    public static class ConcatStringOps

        public static ConcatString operator +([NotNull] ConcatString x,
[NotNull] JSBooleanObject y)
            throw new NotImplementedException ();

So we declare an operator + for class Concatstring outside of concatstring.
gui-compare show me that the silverlight microsoft.Jscript.Runtime.dll
contain a such thing whereas not allowed by compiler...
Do we have to do #if not NET_2_1 around the report of CS0715/CS0563 or I put
all operator in Concatstring class but I do not follow what microsoft has

Olivier Dufour
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080915/da605721/attachment-0001.html 

More information about the Mono-devel-list mailing list