use v6;

use Test;

# TODO: smartlink

# L<"http://use.perl.org/~autrijus/journal/25365">
# Closure composers like anonymous sub, class and module always trumps hash
# dereferences:
#
#   sub{...}
#   module{...}
#   class{...}

plan 2;

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

# vim: ft=perl6

use v6;

use Test;

# TODO: smartlink

# L<"http://use.perl.org/~autrijus/journal/25365">
# Closure composers like anonymous sub, class and module always trumps hash
# dereferences:
#
#   sub{...}
#   module{...}
#   class{...}

plan *;

#?rakudo skip 'confused near "(sub { 42 "'
ok(sub { 42 }(), 'sub {...} works'); # TODO: clarify

#?rakudo skip 'confused near "(sub{ 42 }"'
ok(sub{ 42 }(),  'sub{...} works'); # TODO: clarify

#?rakudo todo 'block parsing problem'
eval_dies_ok q[
    sub x { die }
    x();
], 'block parsing works with newline';

eval_dies_ok q[
    sub x { die };
    x();
], 'block parsing works with semicolon';

done_testing;

# vim: ft=perl6

Test for a parsing problem noticed on IRC
[t/spec] Test for a parsing problem noticed on IRC

git-svn-id: 53605643c415f7495558be95614cf14171f1db78@29038 c213334d-75ef-0310-aa23-eaa082d1ae64
