Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (15 sloc) 0.313 kb
#! nqp
# implicit and explicit returns from subs
plan(3);
sub foo() { 1; }
sub bar() {
return 2;
0;
}
sub baz() {
if (1) { return 3; }
0;
}
ok( foo() == 1 , 'last value in block' );
ok( bar() == 2 , 'explicit return value in block');
ok( baz() == 3 , 'explicit return from nested block');
Jump to Line
Something went wrong with that request. Please try again.