From 798dd6adc5031f8b16da8b771de652e020636f2c Mon Sep 17 00:00:00 2001 From: Youssef Victor <31348972+Youssef1313@users.noreply.github.com> Date: Sat, 11 Jul 2020 23:08:00 +0200 Subject: [PATCH] Update wrong error code in test comments --- .../Test/Emit/CodeGen/CodeGenInParametersTests.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenInParametersTests.cs b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenInParametersTests.cs index 3665af0b1169d..82137abb9c65a 100644 --- a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenInParametersTests.cs +++ b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenInParametersTests.cs @@ -1178,10 +1178,10 @@ static ref int M2(in int arg1, in (int Alice, int Bob) arg2) var comp = CreateCompilationWithMscorlib45(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }); comp.VerifyDiagnostics( - // (18,20): error CS8410: Cannot return variable 'in int' by writable reference because it is a readonly variable + // (18,20): error CS8333: Cannot return variable 'in int' by writable reference because it is a readonly variable // return ref arg1; Diagnostic(ErrorCode.ERR_RefReturnReadonlyNotField, "arg1").WithArguments("variable", "in int").WithLocation(18, 20), - // (23,20): error CS8411: Members of variable 'in (int Alice, int Bob)' cannot be returned by writable reference because it is a readonly variable + // (23,20): error CS8334: Members of variable 'in (int Alice, int Bob)' cannot be returned by writable reference because it is a readonly variable // return ref arg2.Alice; Diagnostic(ErrorCode.ERR_RefReturnReadonlyNotField2, "arg2.Alice").WithArguments("variable", "in (int Alice, int Bob)").WithLocation(23, 20) ); @@ -1269,10 +1269,10 @@ static ref int M(in int arg1, in (int Alice, int Bob) arg2) var comp = CreateCompilationWithMscorlib45(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }); comp.VerifyDiagnostics( - // (10,24): error CS8410: Cannot return variable 'in int' by writable reference because it is a readonly variable + // (10,24): error CS8333: Cannot return variable 'in int' by writable reference because it is a readonly variable // return ref arg1; Diagnostic(ErrorCode.ERR_RefReturnReadonlyNotField, "arg1").WithArguments("variable", "in int").WithLocation(10, 24), - // (14,24): error CS8411: Members of variable 'in (int Alice, int Bob)' cannot be returned by writable reference because it is a readonly variable + // (14,24): error CS8334: Members of variable 'in (int Alice, int Bob)' cannot be returned by writable reference because it is a readonly variable // return ref arg2.Alice; Diagnostic(ErrorCode.ERR_RefReturnReadonlyNotField2, "arg2.Alice").WithArguments("variable", "in (int Alice, int Bob)").WithLocation(14, 24) ); @@ -1388,10 +1388,10 @@ ref int M1(in int arg11, in (int Alice, int Bob) arg21) var comp = CreateCompilationWithMscorlib45(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }); comp.VerifyDiagnostics( - // (12,28): error CS8410: Cannot return variable 'in int' by writable reference because it is a readonly variable + // (12,28): error CS8333: Cannot return variable 'in int' by writable reference because it is a readonly variable // return ref arg11; Diagnostic(ErrorCode.ERR_RefReturnReadonlyNotField, "arg11").WithArguments("variable", "in int").WithLocation(12, 28), - // (16,28): error CS8411: Members of variable 'in (int Alice, int Bob)' cannot be returned by writable reference because it is a readonly variable + // (16,28): error CS8334: Members of variable 'in (int Alice, int Bob)' cannot be returned by writable reference because it is a readonly variable // return ref arg21.Alice; Diagnostic(ErrorCode.ERR_RefReturnReadonlyNotField2, "arg21.Alice").WithArguments("variable", "in (int Alice, int Bob)").WithLocation(16, 28) );