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
((int a, int b, int c), (int d, int e), (int f, int g, int h, int i)) = 42;
104
+
105
+
static class E
106
+
{
107
+
extension(int instance)
108
+
{
109
+
public void Deconstruct(out int a, out int b, out int c)
110
+
=> (a, b, c) = (1, 2, 3);
111
+
}
112
+
}
113
+
""";
114
+
CreateCompilation(source).VerifyEmitDiagnostics(
115
+
// (1,73): error CS7036: There is no argument given that corresponds to the required parameter 'c' of 'E.extension(int).Deconstruct(out int, out int, out int)'
116
+
// ((int a, int b, int c), (int d, int e), (int f, int g, int h, int i)) = 42;
117
+
Diagnostic(ErrorCode.ERR_NoCorrespondingArgument, "42").WithArguments("c", "E.extension(int).Deconstruct(out int, out int, out int)").WithLocation(1, 73),
118
+
// (1,73): error CS8129: No suitable 'Deconstruct' instance or extension method was found for type 'int', with 2 out parameters and a void return type.
119
+
// ((int a, int b, int c), (int d, int e), (int f, int g, int h, int i)) = 42;
// (1,73): error CS8129: No suitable 'Deconstruct' instance or extension method was found for type 'int', with 4 out parameters and a void return type.
125
+
// ((int a, int b, int c), (int d, int e), (int f, int g, int h, int i)) = 42;
// (1,96): error CS8129: No suitable 'Deconstruct' instance or extension method was found for type 'int', with 4 out parameters and a void return type.
149
+
// ((int d, int _, int _), (int _, int e, int _), (int _, int _, int f), (int _, int _, int _)) = 42;
0 commit comments