Permalink
Browse files

[t/spec] semicolon form of package declaration not allowed in subscope

git-svn-id: http://svn.pugscode.org/pugs@30523 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
lwall
lwall committed Apr 30, 2010
1 parent 085eb42 commit f9473b8bed2e294fbcaa625529a7902a58e40998
Showing with 11 additions and 9 deletions.
  1. +5 −4 S02-magicals/subname.t
  2. +6 −5 S03-operators/assign.t
View
@@ -12,10 +12,11 @@ is(foo(), '&Main::foo', 'got the right routine name in the default package');
{
# This testcase might be really redundant
- package Bar;
- sub bar { return &?ROUTINE.name }
- is(bar(), '&Bar::bar', 'got the right routine name outside the default package');
-};
+ package Bar {
+ sub bar { return &?ROUTINE.name }
+ is(bar(), '&Bar::bar', 'got the right routine name outside the default package');
+ }
+}
my $bar = sub { return &?ROUTINE.name };
is($bar(), '<anon>', 'got the right routine name (anon-block)');
View
@@ -507,11 +507,12 @@ sub l () { 1, 2 };
#?rakudo skip 'item assignment, $::(...)'
{
- package Foo;
- our $b;
- my @z = ($::('Foo::b') = l(), l());
- is($b.elems, 2, q/lhs treats $::('Foo::b') as scalar (1)/);
- is(@z.elems, 3, q/lhs treats $::('Foo::b') as scalar (2)/);
+ package Foo {
+ our $b;
+ my @z = ($::('Foo::b') = l(), l());
+ is($b.elems, 2, q/lhs treats $::('Foo::b') as scalar (1)/);
+ is(@z.elems, 3, q/lhs treats $::('Foo::b') as scalar (2)/);
+ }
}
#?rakudo skip 'Autovivify full qualified name'

0 comments on commit f9473b8

Please sign in to comment.