Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only allow static methods for applicable members #3281

Merged
merged 2 commits into from
Mar 19, 2020

Commits on Mar 19, 2020

  1. Only allow static methods for applicable members

    This fixes a very similar problem to dotnet#3277, where this code is unable to be resolved:
    ```cs
    interface I1{}
    interface I2{}
    
    public unsafe class C : I1, I2 {
        void M(I1 i) {}
        static void M(I2 i) {}
        public void M1() {
            delegate*<C, void> a = M; // Ambiguous because both M's are applicable
        }
    }
    ```
    With this change, the instance method M is not applicable, so there is no ambiguity.
    333fred committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    c2bc8d9 View commit details
    Browse the repository at this point in the history
  2. Fix doubled statement

    333fred committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    d9cff7e View commit details
    Browse the repository at this point in the history