Skip to content

Instantly share code, notes, and snippets.

@Tux
Created March 8, 2015 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tux/630df763184b5ff869f4 to your computer and use it in GitHub Desktop.
Save Tux/630df763184b5ff869f4 to your computer and use it in GitHub Desktop.
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