Created
March 8, 2015 13:51
-
-
Save Tux/630df763184b5ff869f4 to your computer and use it in GitHub Desktop.
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 v6; | |
#use Slang::Tuxic; | |
my %cb; | |
class B { | |
has Int $.i is rw = 0; | |
} | |
class C { | |
has B @!f = (B.new(i => 1), B.new(i => 2)); | |
method foo { | |
defined %cb{"cb"} and %cb{"cb"}.(self, @!f); | |
return @!f; | |
} | |
} | |
C.new.foo().perl.say; | |
%cb{"cb"} = sub (C $c, B @f) { }; # NO ACTION AT ALL | |
C.new.foo().perl.say; | |
==> | |
when Slang::Tuxic active, I get | |
===SORRY!=== Error while compiling t.pl | |
Unable to parse expression in argument list; couldn't find final ')' | |
at t.pl:21 | |
------> %cb{"cb"} = sub (C⏏ $c, B @f) { }; # NO ACTION AT ALL | |
expecting any of: | |
infix stopper | |
infix or meta-infix | |
Exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment