Skip to content

Commit

Permalink
Fixup collection expression tests after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jjonescz committed Oct 3, 2024
1 parent dcb3058 commit a14d479
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ private static string Concat(string container, string name)
"""
static partial class CollectionExtensions
{
internal static void ReportSpan<T>(this in Span<T> s)
{
Report((ReadOnlySpan<T>)s);
}
internal static void Report<T>(this in ReadOnlySpan<T> s)
{
var builder = new StringBuilder();
Expand Down Expand Up @@ -1960,8 +1964,9 @@ static void Main()
comp = CreateCompilation(
new[] { sourceA, sourceB2 },
parseOptions: TestOptions.RegularPreview,
options: TestOptions.ReleaseExe,
targetFramework: TargetFramework.Net80);
comp.VerifyEmitDiagnostics(expectedDiagnostic);
CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: "Span<string>").VerifyDiagnostics();

comp = CreateCompilation(
new[] { sourceA, sourceB2 },
Expand Down Expand Up @@ -2042,9 +2047,9 @@ public void BetterConversionFromExpression_04()
class Program
{
static void F1(int[] x, int[] y) { throw null; }
static void F1(Span<object> x, ReadOnlySpan<int> y) { x.Report(); y.Report(); }
static void F1(Span<object> x, ReadOnlySpan<int> y) { x.ReportSpan(); y.Report(); }
static void F2(object x, string[] y) { throw null; }
static void F2(string x, Span<object> y) { y.Report(); }
static void F2(string x, Span<object> y) { y.ReportSpan(); }
static void Main()
{
F1([1], [2]);
Expand Down

0 comments on commit a14d479

Please sign in to comment.