You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var comp = CreateCompilationWithMscorlib40(source, references: new[] { lib.ToMetadataReference() });
22275
22275
comp.VerifyDiagnostics(
22276
-
// (4,24): error CS0012: The type '(, )' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
22276
+
// (4,24): error CS0012: The type '(, )' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
var methodM = comp.GetMember<MethodSymbol>("A.M");
@@ -22313,9 +22313,9 @@ public class B
22313
22313
22314
22314
var comp = CreateCompilationWithMscorlib40(source, references: new[] { lib.ToMetadataReference() });
22315
22315
comp.VerifyDiagnostics(
22316
-
// (4,24): error CS0012: The type '(, )' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
22316
+
// (4,24): error CS0012: The type '(, )' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
var methodM = comp.GetMember<MethodSymbol>("A.M");
@@ -23145,7 +23145,7 @@ public void ValueTupleBaseError_NoSystemRuntime()
23145
23145
{
23146
23146
((int, int), (int, int)) F();
23147
23147
}";
23148
-
var comp = CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleRef });
23148
+
var comp = CreateCompilationWithMscorlib40(source, references: [ValueTupleLegacyRef]);
23149
23149
comp.VerifyEmitDiagnostics(
23150
23150
// (3,6): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
// (6,17): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
// (6,17): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
var compilation = CreateCompilationWithMscorlib40(source,
23985
-
references: new[] { ValueTupleRef });
23986
-
23981
+
var compilation = CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleLegacyRef });
23987
23982
compilation.VerifyEmitDiagnostics(
23988
-
// (7,24): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
23983
+
// (6,24): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
// (9,22): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
// (8,22): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Copy file name to clipboardExpand all lines: src/Compilers/CSharp/Test/Emit2/Attributes/AttributeTests_Tuples.cs
+18-18
Original file line number
Diff line number
Diff line change
@@ -221,12 +221,12 @@ class C
221
221
// (4,12): error CS0518: Predefined type 'System.String' is not defined or imported
222
222
// static (int x, int y) M() => (0, 0);
223
223
Diagnostic(ErrorCode.ERR_PredefinedTypeNotFound,"(int x, int y)").WithArguments("System.String").WithLocation(4,12),
224
-
// (4,12): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
224
+
// (4,12): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
225
225
// static (int x, int y) M() => (0, 0);
226
-
Diagnostic(ErrorCode.ERR_NoTypeDef,"(int x, int y)").WithArguments("System.ValueType","System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a").WithLocation(4,12),
227
-
// (4,34): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
226
+
Diagnostic(ErrorCode.ERR_NoTypeDef,"(int x, int y)").WithArguments("System.ValueType","mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089").WithLocation(4,12),
227
+
// (4,34): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
// (20,6): error CS0592: Attribute 'TupleElementNames' is not valid on this declaration type. It is only valid on 'class, struct, property, indexer, field, parameter, return' declarations.
837
+
// (20,6): error CS8138: Cannot reference 'System.Runtime.CompilerServices.TupleElementNamesAttribute' explicitly. Use the tuple syntax to define tuple names.
// (28,33): error CS8331: Cannot reference 'System.Runtime.CompilerServices.TupleElementNamesAttribute' explicitly. Use the tuple syntax to define tuple names.
843
+
// (28,33): error CS7036: There is no argument given that corresponds to the required parameter 'transformNames' of 'TupleElementNamesAttribute.TupleElementNamesAttribute(string[])'
844
844
// public (int x, int y) this[[TupleElementNames](int a, int b) t] => t;
0 commit comments