Skip to content

Commit

Permalink
Add test for RT #114456
Browse files Browse the repository at this point in the history
  • Loading branch information
usev6 committed Oct 14, 2014
1 parent c855d94 commit 09ff536
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions S02-lexical-conventions/sub-block-parsing.t
Expand Up @@ -12,13 +12,20 @@ use Test;
# module{...}
# class{...}

plan 9;
plan 11;

ok(sub { 42 }(), 'sub {...}() works'); # TODO: clarify

ok(sub{ 42 }(), 'sub{...}() works'); # TODO: clarify

#RT #76432
# RT #114456
{
is sub { 42 }(), 42, 'can invoke sub with "()" directly after declaration';
is sub ($t) { $t }('arf'), 'arf',
'can pass argument within "()" directly after sub declaration';
}

# RT #76432
throws_like { EVAL q[
sub x { die }
x();
Expand All @@ -40,7 +47,7 @@ throws_like { EVAL q[
'RT #85844';
}

# RT #76896:
# RT #76896:
# perl6 - sub/hash syntax
{
sub to_check_before {
Expand Down

0 comments on commit 09ff536

Please sign in to comment.