Fixed test returns after warning code change in 9a359405f0

上级 93326703
......@@ -327,9 +327,9 @@ void M(int p)
// CS0177: The out parameter 'y' must be assigned to before control leaves the current method
// /*<bind>*/void Foo(out int y) => ;/*</bind>*/
Diagnostic(ErrorCode.ERR_ParamUnassigned, "Foo").WithArguments("y").WithLocation(6, 24),
// CS0168: The variable 'Foo' is declared but never used
// CS8321: The local function 'Foo' is declared but never used
// /*<bind>*/void Foo(out int y) => ;/*</bind>*/
Diagnostic(ErrorCode.WRN_UnreferencedVar, "Foo").WithArguments("Foo").WithLocation(6, 24)
Diagnostic(ErrorCode.WRN_UnreferencedLocalFunction, "Foo").WithArguments("Foo").WithLocation(6, 24)
};
VerifyOperationTreeAndDiagnosticsForTest<LocalFunctionStatementSyntax>(source, expectedOperationTree, expectedDiagnostics);
......@@ -356,9 +356,9 @@ void M(int p)
// CS1026: ) expected
// /*<bind>*/void Foo( { }/*</bind>*/;
Diagnostic(ErrorCode.ERR_CloseParenExpected, "{").WithLocation(6, 29),
// CS0168: The variable 'Foo' is declared but never used
// CS8321: The local function 'Foo' is declared but never used
// /*<bind>*/void Foo( { }/*</bind>*/;
Diagnostic(ErrorCode.WRN_UnreferencedVar, "Foo").WithArguments("Foo").WithLocation(6, 24)
Diagnostic(ErrorCode.WRN_UnreferencedLocalFunction, "Foo").WithArguments("Foo").WithLocation(6, 24)
};
VerifyOperationTreeAndDiagnosticsForTest<LocalFunctionStatementSyntax>(source, expectedOperationTree, expectedDiagnostics);
......@@ -387,12 +387,12 @@ void M(int p)
// CS0246: The type or namespace name 'X' could not be found (are you missing a using directive or an assembly reference?)
// /*<bind>*/X Foo() { }/*</bind>*/;
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "X").WithArguments("X").WithLocation(6, 19),
// CS0168: The variable 'Foo' is declared but never used
// CS8321: The local function 'Foo' is declared but never used
// /*<bind>*/X Foo() { }/*</bind>*/;
Diagnostic(ErrorCode.WRN_UnreferencedVar, "Foo").WithArguments("Foo").WithLocation(6, 21)
Diagnostic(ErrorCode.WRN_UnreferencedLocalFunction, "Foo").WithArguments("Foo").WithLocation(6, 21)
};
VerifyOperationTreeAndDiagnosticsForTest<LocalFunctionStatementSyntax>(source, expectedOperationTree, expectedDiagnostics);
}
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册