Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[t] two new tests
One fails.
  • Loading branch information
Carl Masak committed Feb 12, 2011
1 parent 639e391 commit b62dada
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions t/compiler.t
Expand Up @@ -37,6 +37,7 @@ my @programs-that-compile =
'our $a',
'my $a; $a()',
'{ say 42 }()',
'my $a = 1; { say my $a = 2 }', # declare+use in block is fine
;

sub escape($string) { $string.subst("\n", "\\n", :g) }
Expand Down Expand Up @@ -69,6 +70,7 @@ my @programs-that-don't-compile = # '
'if 5 {} else { $a }',
'unless {}',
'unless a {}',
'my $a = 1; { say $a; my $a = 2 }', # use+declaration is outlawed
;

for @programs-that-don't-compile -> $program { # '
Expand Down

0 comments on commit b62dada

Please sign in to comment.