@@ -14299,6 +14299,24 @@ internal class CSharpResources {
}
}
/// <summary>
/// Looks up a localized string similar to The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator..
/// Looks up a localized string similar to The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator..
/// Looks up a localized string similar to The tuple element name '{0}' is ignored because a different name or no name is specified by the target type '{1}'..
<value>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</value>
<source>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<targetstate="new">The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<targetstate="new">The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<targetstate="new">The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<targetstate="new">The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<target state="new">The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<targetstate="new">The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<targetstate="new">The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<targetstate="new">The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
<source>The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</source>
<targetstate="new">The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.</target>
@@ -3973,6 +3973,92 @@ public override int GetHashCode()
);
}
[Fact]
publicvoidTestElementNames()
{
varsource=@"
#pragma warning disable CS0219
using static System.Console;
public class C
{
public static void Main()
{
int a = 1;
int b = 2;
int c = 3;
int d = 4;
int x = 5;
int y = 6;
(int x, int y) t1 = (1, 2);
(int, int) t2 = (1, 2);
Write($""{REPLACE}"");
}
}
";
// tuple expression vs tuple expression
validate("t1 == t2");
// tuple expression vs tuple literal
validate("t1 == (x: 1, y: 2)");
validate("t1 == (1, 2)");
validate("(1, 2) == t1");
validate("(x: 1, d) == t1");
validate("t2 == (x: 1, y: 2)",
// (16,25): warning CS8375: The tuple element name 'x' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.
// (16,31): warning CS8375: The tuple element name 'y' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.
// - warnings reported on the right when both sides could complain
// - no warnings on inferred names
validate("((a, b), c: 3) == ((1, x: 2), 3)",
// (16,27): warning CS8375: The tuple element name 'c' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.
// (16,41): warning CS8375: The tuple element name 'x' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.
// (16,29): warning CS8375: The tuple element name 'c' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.
// (16,35): warning CS8375: The tuple element name 'c' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.
// (16,25): warning CS8375: The tuple element name 'b' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.
// (16,32): warning CS8375: The tuple element name 'c' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.
// (16,41): warning CS8375: The tuple element name 'd' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.