Skip to content

Commit c39ae9a

Browse files
committed
Adapt code to support -preview=in
When the switch is provided, '[auto] ref in' becomes illegal in the parser, so instead just use const scope.
1 parent 99977c0 commit c39ae9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/mir/ndslice/internal.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ template DynamicArrayDimensionsCount(T)
259259
enum size_t DynamicArrayDimensionsCount = 0;
260260
}
261261

262-
bool isPermutation(size_t N)(auto ref in size_t[N] perm)
262+
bool isPermutation(size_t N)(auto ref const scope size_t[N] perm)
263263
{
264264
int[N] mask;
265265
return isValidPartialPermutationImpl(perm, mask);
@@ -328,7 +328,7 @@ private enum isReference(P) =
328328
alias ImplicitlyUnqual(T) = Select!(isImplicitlyConvertible!(T, Unqual!T), Unqual!T, T);
329329
alias ImplicitlyUnqual(T : T*) = T*;
330330

331-
size_t lengthsProduct(size_t N)(auto ref in size_t[N] lengths)
331+
size_t lengthsProduct(size_t N)(auto ref const scope size_t[N] lengths)
332332
{
333333
size_t length = lengths[0];
334334
foreach (i; Iota!(1, N))

0 commit comments

Comments
 (0)