Skip to content

Commit 07090ae

Browse files
committed
disable kickstart in ctfe to workaround Issue 16626
- consumes too much memory, introduced by e98fa4a (#4286)
1 parent b95b67a commit 07090ae

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

std/regex/internal/parser.d

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,13 +1501,12 @@ pure:
15011501
}
15021502
}
15031503
checkIfOneShot();
1504-
if (!(flags & RegexInfo.oneShot))
1504+
if (!(flags & RegexInfo.oneShot) && !__ctfe)
15051505
{
15061506
kickstart = new ShiftOr!Char(zis);
15071507
if (kickstart.empty)
15081508
{
1509-
if (!__ctfe)
1510-
kickstart = new BitMatcher!Char(zis);
1509+
kickstart = new BitMatcher!Char(zis);
15111510
if (kickstart.empty)
15121511
kickstart = null;
15131512
}

0 commit comments

Comments
 (0)