Skip to content

Commit

Permalink
Add regression test for dotnet#17719 (dotnet#20281)
Browse files Browse the repository at this point in the history
  • Loading branch information
agocke authored Jun 19, 2017
1 parent 18be653 commit 6cd6215
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,25 @@ public static IMethodSymbol FindLocalFunction(this CompilationVerifier verifier,
[CompilerTrait(CompilerFeature.LocalFunctions)]
public class CodeGenLocalFunctionTests : CSharpTestBase
{
[Fact]
[WorkItem(17719, "https://github.com/dotnet/roslyn/issues/17719")]
public void Repro17719()
{
var comp = CompileAndVerify(@"
using System;
class C
{
public static void Main()
{
T GetField<T>(string name, T @default = default(T))
{
return @default;
}
Console.WriteLine(GetField<int>(string.Empty));
}
}", expectedOutput: "0");
}

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

0 comments on commit 6cd6215

Please sign in to comment.