|From:||Jonathan Scott Duff <duff [...] pobox.com>|
|Subject:||Questionable "Variable not declared" error|
|Date:||Tue, 6 May 2014 14:42:02 -0500|
|To:||rakudobug [...] perl.org|
19:30 <PerlJam> m: my %h is default(%h<foo>); # surely this is a bug?
19:30 <+camelia> rakudo-moar 1ccc4d: OUTPUT«===SORRY!=== Error while compiling /tmp/HtntR_h3tN␤Variable '%h' is not
declared␤at /tmp/HtntR_h3tN:1␤------> my %h is default(%h<foo>⏏); # surely this is a bug?␤
expecting any of:␤ postfix␤»
19:31 <masak> PerlJam: yes. it's a bug by the parsing principles of Perl 6, I would say.
19:31 <masak> PerlJam: as in, %h should be defined by that point.
19:31 <masak> s/defined/declared/
19:32 <masak> that's why something like this works:
19:32 <masak> m: my %h = %h; say %h
19:32 <+camelia> rakudo-moar 1ccc4d: OUTPUT«().hash␤»
19:33 -!- lizmat [~email@example.com] has joined #perl6
19:34 <lizmat> PerlJam: could you rakudobug that?
19:34 <retupmoca> oh, that's interesting
19:34 <retupmoca> m: my $x = $x.^name; say $x; say $x.^name;
19:34 <+camelia> rakudo-moar 1ccc4d: OUTPUT«Any␤Str␤»
19:35 <jnthn> PerlJam, lizmat: I think it's 'cus the traits are part of the declaration...
19:36 <jnthn> And until we know there's no "is FooType" trait there, we don't actually know what container to install.
19:36 -!- lvfjf [~chatzilla@gateway/tor-sasl/lvfjf] has joined #perl6
19:36 <jnthn> So it's kinda a can of worms to open.
19:36 <lizmat> ok... one of those things then...
19:36 <jnthn> "of" is similar
19:36 <PerlJam> sure, but the name %h is already in existence, so "Variable not declared" is LTA