Skip to content

Conversation

@RexJaeschke
Copy link
Contributor

Jon, this addresses your comment.

@KalleOlaviNiemitalo
Copy link
Contributor

KalleOlaviNiemitalo commented Jan 24, 2026

Filed #1549. But also:

using System;
using System.Runtime.CompilerServices;

public class MAttribute : Attribute {
    public MAttribute(
        [CallerMemberName]string? name = null) {
    }
}

class C { 
    void Fun1() {
        void Fun2<[M]T>(){}
    }
}

SharpLab shows this being lowered to void Fun2<[M("Fun2")]T>(){} but the draft seems to require void Fun2<[M("Fun1")]T>(){} because Fun2 as a local function is not a function member. Now is that a compiler bug or a spec bug?

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.

3 participants