Skip to content

Commit 06d2abb

Browse files
committed
Test sinkage of package call in for
Closes rakudo/rakudo#1693 R#1693 Rakudo fix: rakudo/rakudo@4402839adb
1 parent 03ac03f commit 06d2abb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

S04-statements/sink.t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
use v6;
2+
use lib $?FILE.IO.parent(2).add: 'packages';
23
use Test;
4+
use Test::Util;
35

4-
plan 8;
6+
plan 9;
57

68
# RT #117235
79
{
@@ -93,3 +95,7 @@ subtest 'sub calls in last statement of sunk `for` get sunk' => {
9395
throws-like { sub foo {fail}; for ^1 { foo }; Nil }, Exception,
9496
'block `for` with sub that returns Failure';
9597
}
98+
99+
# https://github.com/rakudo/rakudo/issues/1693
100+
is_run unit package A; our sub need() {}; for <s> { A::need }; print 'pass',
101+
{ :out<pass>, :err(''), :0status}, 'no crash in for ... { Package::foo }';

0 commit comments

Comments
 (0)