Skip to content

Conversation

@jskeet
Copy link
Contributor

@jskeet jskeet commented Nov 27, 2025

Fixes #870

(I had to have a couple of goes at the "additional targets" part - feel free to nitpick the exact wording.)

Copy link
Contributor

@Nigel-Ecma Nigel-Ecma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KalleOlaviNiemitalo
Copy link
Contributor

Side note. "provided they do not alter the behavior of any strictly conforming program" seems like it could interfere with using static. Something like

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Must attribute arguments be exactly as shown in Annex C?

5 participants