Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (23 sloc) 855 Bytes
use v6;
use Test;
plan 6;
# this test file contains tests for line numbers, among other things
# so it's extremely important not to randomly insert or delete lines.
my $baseline = 10;
isa_ok callframe(), CallFrame, 'callframe() returns a CallFrame';
sub f() {
is callframe().line, $baseline + 5, 'callframe().line';
ok callframe().file ~~ /« callframe »/, '.file';
#?rakudo skip '.inline'
nok callframe().inline, 'explicitly entered block (.inline)';
# Note: According to S02, these should probably fail unless
# $x is marked 'is dynamic'. We allow it for now since there's
# still some uncertainty in the spec in S06, though.
is callframe(1).my.<$x>, 42, 'can access outer lexicals via .my';
callframe(1).my.<$x> = 23;
my $x = 42;
is $x, 23, '$x successfully modified';
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.