提交 0b3e8437 编写于 作者: C Charles Stoner

PR feedback

上级 5a22f4bf
......@@ -562,7 +562,6 @@ static void Main()
Diagnostic(ErrorCode.ERR_DeprecatedSymbolStr, "EP").WithArguments("EP", "DP").WithLocation(20, 19));
}
// Suppress diagnostics in unused import statements.
[Fact]
public void TestImportStatements()
{
......
......@@ -760,8 +760,12 @@ End Class
]]>
</file>
</compilation>
CreateCompilationWithMscorlib(source).VerifyDiagnostics(
Diagnostic(ERRID.WRN_UseOfObsoleteSymbolNoMessage1, "A").WithArguments("A").WithLocation(11, 24))
Dim comp = CreateCompilationWithMscorlib(source)
comp.AssertTheseDiagnostics(<errors><![CDATA[
BC40008: 'A' is obsolete.
Return New A()
~
]]></errors>)
End Sub
<Fact>
......@@ -826,9 +830,15 @@ End Class
]]>
</file>
</compilation>
CreateCompilationWithMscorlib(source).VerifyDiagnostics(
Diagnostic(ERRID.ERR_ObsoleteInvalidOnEventMember, "<Deprecated(Nothing, DeprecationType.Deprecate, 0)>RemoveHandler(value As EventHandler)").WithArguments("Windows.Foundation.Metadata.DeprecatedAttribute").WithLocation(31, 9),
Diagnostic(ERRID.WRN_UseOfObsoleteSymbolNoMessage1, "A").WithArguments("A").WithLocation(14, 19))
Dim comp = CreateCompilationWithMscorlib(source)
comp.AssertTheseDiagnostics(<errors><![CDATA[
BC40008: 'A' is obsolete.
M(New A())
~
BC31142: 'Windows.Foundation.Metadata.DeprecatedAttribute' cannot be applied to the 'AddHandler', 'RemoveHandler', or 'RaiseEvent' definitions. If required, apply the attribute directly to the event.
<Deprecated(Nothing, DeprecationType.Deprecate, 0)>RemoveHandler(value As EventHandler)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
]]></errors>)
End Sub
<Fact>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册