提交 96e16e61 编写于 作者: A Andy Gocke 提交者: GitHub

Add regression test for non-repoable customer issue (#15933)

See #15751
上级 8823ba3a
......@@ -3126,6 +3126,38 @@ public void UseBeforeDeclaration()
VerifyOutputInMain(src, "5");
}
[Fact]
[WorkItem(15558, "https://github.com/dotnet/roslyn/issues/15558")]
public void CapturingSharesVar()
{
var src = @"
int i = 0;
int oldi<T>()
where T : struct
=> (i += @sizeof<T>()) - @sizeof<T>();
int @sizeof<T>()
where T : struct
=> typeof(T).IsAssignableFrom(typeof(long))
? sizeof(long)
: 1;
while (i < 10)
System.Console.WriteLine(oldi<byte>());";
VerifyOutputInMain(src, @"0
1
2
3
4
5
6
7
8
9");
}
[Fact]
[WorkItem(15599, "https://github.com/dotnet/roslyn/issues/15599")]
public void NestedLocalFuncCapture()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册