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
Copy file name to clipboardExpand all lines: src/Compilers/CSharp/Test/Emit3/Semantics/ExtensionTests.cs
+1-37Lines changed: 1 addition & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -23945,7 +23945,6 @@ public void M13() {}
23945
23945
""";
23946
23946
var comp = CreateCompilation(src);
23947
23947
23948
-
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : Despite the fact that we do not complain about M6, should we report an error for M2 (the only difference is receiver ref-ness)?
23949
23948
comp.VerifyDiagnostics(
23950
23949
// (10,21): error CS0111: Type 'Extensions' already defines a member called 'M1' with the same parameter types
23951
23950
// public void M1() {}
@@ -24150,22 +24149,15 @@ public static void M12(in int x) {}
24150
24149
// (46,28): error CS0111: Type 'Extensions' already defines a member called 'M5' with the same parameter types
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : It feels unfortunate that we generate conflicting signatures, the methods extend different types (refer to M6 and M7 cases)
24155
-
24156
24152
// (56,28): error CS0111: Type 'Extensions' already defines a member called 'M6' with the same parameter types
// (66,28): error CS0111: Type 'Extensions' already defines a member called 'M7' with the same parameter types
24160
24156
// static public long M7() => 0;
24161
-
Diagnostic(ErrorCode.ERR_MemberAlreadyExists, "M7").WithArguments("M7", "Extensions").WithLocation(66, 28), // Tracked by https://github.com/dotnet/roslyn/issues/76130 : Signatures in metadata are different in this case (return type is different), consider if we want to enable this specific case
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : confirm whether we want this betterness behavior (for methods and/or properties)
26805
26776
var comp = CreateCompilation(src);
26806
26777
comp.VerifyEmitDiagnostics();
26807
26778
@@ -26923,7 +26894,6 @@ static class E2
26923
26894
}
26924
26895
}
26925
26896
""";
26926
-
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : confirm whether we want this betterness behavior (for methods and/or properties)
26927
26897
var comp = CreateCompilation(src);
26928
26898
comp.VerifyEmitDiagnostics();
26929
26899
@@ -26954,7 +26924,6 @@ static class E2
26954
26924
}
26955
26925
}
26956
26926
""";
26957
-
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : confirm whether we want this betterness behavior for methods
26958
26927
var comp = CreateCompilation(src);
26959
26928
comp.VerifyEmitDiagnostics(
26960
26929
// (1,5): error CS0121: The call is ambiguous between the following methods or properties: 'E1.extension(int).M<T>(T)' and 'E2.extension<T>(T).M(int)'
@@ -26986,7 +26955,6 @@ static class E2
26986
26955
}
26987
26956
}
26988
26957
""";
26989
-
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : confirm whether we want this betterness behavior for methods when the receiver is a type
0 commit comments