Skip to content

Commit af22bdc

Browse files
1-1samkhwilliamson
authored andcommitted
todo test for GH 19378 (sub () { !0 } changes PL_sv_yes states)
1 parent 8b36caa commit af22bdc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

t/run/todo.t

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,20 @@ TODO: {
337337

338338
}
339339

340+
TODO: {
341+
local $::TODO = 'GH 19378';
342+
fresh_perl_like(
343+
<<~'HERE',
344+
sub () { !0 };
345+
for (!0) { $_++ };
346+
HERE
347+
qr/Modification of a read-only value/,
348+
{},
349+
"'sub () { !0 }' does not prevent 'Modification of a read-only value' error; GH 19378"
350+
);
351+
isnt($?, 0, 'Compilation fails; GH 19378');
352+
}
353+
340354
TODO: {
341355
todo_skip 1 if is_miniperl();
342356
local $::TODO = 'GH 22168';

0 commit comments

Comments
 (0)