Created
July 2, 2012 17:07
-
-
Save timo/3034309 to your computer and use it in GitHub Desktop.
perl6 where clauses on subsets don't close over outer vars?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Test; | |
plan 2; | |
my $outer = "hello"; | |
subset LikeOuter of Str where { $_ eq $outer }; | |
my LikeOuter $a = "hello"; | |
dies_ok { $a = "what" }; | |
$outer = "what"; | |
lives_ok { $a = "what" }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment