提交 2ba8bbfe 编写于 作者: N Neal Gafter

Add a test for nameof(typeParam) in method parameter default value

Fixes #564
上级 48398f9c
......@@ -3521,5 +3521,21 @@ N1N2
]]>).VerifyDiagnostics()
End Sub
<Fact, WorkItem(564, "https://github.com/dotnet/roslyn/issues/564")>
Public Sub NameOfTypeParameterInDefaultValue()
Dim compilationDef =
<compilation>
<file name="a.vb">
Module Program
Sub M(Of TP)(Optional name As String = NameOf(TP))
End Sub
End Module
</file>
</compilation>
Dim comp = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, TestOptions.DebugDll)
CompileAndVerify(comp).VerifyDiagnostics()
End Sub
End Class
End Namespace
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册