Skip to content

Commit

Permalink
Cannot change languages in *any* scope
Browse files Browse the repository at this point in the history
Related to Raku/old-issue-tracker#2127 .
It is my understanding that it will never be possible to change
language inside a scope.  Please revert this if this assumption
is wrong.
  • Loading branch information
lizmat committed Jan 12, 2020
1 parent 6739371 commit 1080f6d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions S01-perl-5-integration/basic.t
Expand Up @@ -77,16 +77,10 @@ my $s = 'str';
is($result,4,$test);
}

#?rakudo skip "would need v5"
# https://github.com/Raku/old-issue-tracker/issues/2127
{
sub add_in_perl ($x, $y) {
use v5;
$x + $y;
}

eval-lives-ok("{use v5;}", "RT #77596 - use v5 in a block lives");

is(add_in_perl(42, 42), 84, 'Defining subroutines with "use v5" blocks');
dies-ok { q/sub a() { use v5; }/.EVAL }, 'cannot switch languages inside a sub';
dies-ok { q/{ use v5; }/.EVAL }, 'or any scope for that matter';
}

# vim: ft=perl6

0 comments on commit 1080f6d

Please sign in to comment.