Skip to content

Commit d13835e

Browse files
committed
Add test for "params scoped Span'.
1 parent ed36ba1 commit d13835e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ICSharpCode.Decompiler.Tests/TestCases/Pretty/ParamsCollections.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Diagnostics.CodeAnalysis;
34

45
namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
56
{
@@ -15,6 +16,11 @@ public static void ParamsReadOnlySpan(params ReadOnlySpan<int> values)
1516
{
1617
}
1718
public static void ParamsSpan(params Span<int> values)
19+
{
20+
// note: implicitly "scoped", "params scoped Span<int> values" is allowed
21+
// but "scoped" is always redundant for params.
22+
}
23+
public static void ParamUnscopedSpan([UnscopedRef] params Span<int> values)
1824
{
1925
}
2026
}

0 commit comments

Comments
 (0)