Skip to content

Conformance and new members #1490

@jskeet

Description

@jskeet

This is with reference to conformance.md.

Originally posted by @KalleOlaviNiemitalo in #1486 (comment)

using static A;

namespace B {
    using static System.Int32;
    class C {
        static int Main() => MaxValue;
    }
}

class A {
    public const int MaxValue = 42;
}

Now if the implementation extends System.Int32 with a public const int MaxValue member, then Main() will return that rather than A.MaxValue, thus changing the behaviour. So the rule seems to pretty much disallow providing additional static members. Or is this kind of program not strictly conforming?

Metadata

Metadata

Assignees

No one assigned

    Labels

    meeting: discussThis issue should be discussed at the next TC49-TG2 meeting

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions