.Net 1.1 framework compatibility with ECMA

E

Egis

If I have correctly understood, .Net framework libraries
should match ECMA-335 standard (latest is second edition).
mscorelib.dll (1.1) contains class "CharEnumerator" with
property declared folowing:
".property instance object
System.Collections.IEnumerator.Current()"
CLI standard says, that property should be declared:
..property <propHead> { <propMember>* };
<propHead>::= [specialname][rtspecialname] <callConv>
<type> <id> ( <parameters> );
ID - C style alphaNumeric identifier (e.g. Hello_There2);

Here we got that properties id is declared with dots, so
it should be incopatibility with ECMA-335 standard? Could
someone explain this situation? 1.0 .Net Framework
contains correct property declaration.

Thank you
 
J

Jon Skeet [C# MVP]

Egis said:
If I have correctly understood, .Net framework libraries
should match ECMA-335 standard (latest is second edition).
mscorelib.dll (1.1) contains class "CharEnumerator" with
property declared folowing:
".property instance object
System.Collections.IEnumerator.Current()"
CLI standard says, that property should be declared:
.property <propHead> { <propMember>* };
<propHead>::= [specialname][rtspecialname] <callConv>
<type> <id> ( <parameters> );
ID - C style alphaNumeric identifier (e.g. Hello_There2);

Here we got that properties id is declared with dots, so
it should be incopatibility with ECMA-335 standard? Could
someone explain this situation? 1.0 .Net Framework
contains correct property declaration.

I suspect the standard is effectively wrong, and <id> should be
<dottedname> in the same way that it is for <methodName>. This allows
for explicit interface implementation. For example, compile this and
have a look at the generated assembly:

using System;

public interface IFoo
{
string Bar
{
get;
}
}

public class Foo : IFoo
{
string IFoo.Bar
{
get { return null; }
}

string Bar
{
get { return null; }
}

static void Main()
{
Foo x = new Foo();
string a = x.Bar;
string b = ((IFoo)x).Bar;
}
}
 
E

Egis

Obviously it should be specification bug. I have tried to
compile your code with 1.0 C# compiler, and interface
property implementation is gone. Also I find that in
System.data.dll there is used method modifier
keword "strict", which is not described in CIL
specification. I think, it is not good way to fix first
compilation language, without updating specification
document first.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top