Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect KEEP / UNDO gets fired under certain exit conditions #1214

ugexe opened this issue Oct 26, 2017 · 2 comments


None yet
3 participants
Copy link

commented Oct 26, 2017

I expect .print (or .say, .note, etc), which returns True, to fire the KEEP phaser.

$ perl6 -e 'for 1..5 { KEEP print(" "); UNDO print("_");  .print; }'



This comment has been minimized.

Copy link

commented Mar 29, 2018


$ perl6 -e '{ KEEP print("K"); 42.Str; };'
$ perl6 -e '{ KEEP print("K"); 42; };'

Also this is actually being (wrongly) considered an unsuccessful block exit,
so it also affects hypothetical vars:

$ perl6 -e 'my $a = 0; { let $a = 1; KEEP print("K$_"); 42.Str; }; $a.say;' # Should print "K421"
$ perl6 -e 'my $a = 0; { let $a = 1; KEEP print("K$_"); 42; }; $a.say;' # Should print "K421"

"sink 42" also kills it, but probably should since the block then returns Nil which is truly unsuccessful

ISTR code to short-circuit "useless use" messages when a method form is seen. That's where to start looking IMO.


This comment has been minimized.

Copy link

commented Apr 2, 2018

The above commit was spectested when merged with HEAD and note there is a previous commit in that branch for another issue. The branch itself was kept back to avoid merge noise. I don't know if that is precisely the correct flavor of wanting to use there... that whole system confuses me a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.