Skip to content

Commit

Permalink
Verify scenario with nameof in default parameter value (#64931)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjonescz authored Oct 24, 2022
1 parent 8df858c commit 68c56b3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Compilers/CSharp/Test/Semantic/Semantics/LocalFunctionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4633,6 +4633,18 @@ public static void Main()
});
}

[Fact, WorkItem(16821, "https://github.com/dotnet/roslyn/issues/16821")]
public void LocalFunction_ParameterDefaultValue_NameOfLocalFunction()
{
var source = """
using System;
void Local() {}
void Local2(string s = nameof(Local)) => Console.WriteLine(s);
Local2();
""";
CreateCompilation(source).VerifyDiagnostics();
}

[Fact]
[WorkItem(15536, "https://github.com/dotnet/roslyn/issues/15536")]
public void CallFromDifferentSwitchSection_01()
Expand Down

0 comments on commit 68c56b3

Please sign in to comment.