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

but keyword ought to be associative #2662

fecundf opened this issue Jan 30, 2019 · 0 comments


None yet
1 participant
Copy link

commented Jan 30, 2019

The Problem

use v6;

role Diva { }
role Violinist { }
class Puppy { }

class Wonder-Dog is Puppy does Diva does Violinist { }

my $best_friend = but (Violinist, Diva);

our $companion = ( but Violinist) but Diva;

# Everything above works, but the below line fails with
# Operators 'but' and 'but' are non-associative and require parentheses
my $quizzical = but Violinist but Diva;

Expected Behavior

$thing but Role1 but Role2 should be the same as $thing but (Role1, Role2), working similarly to does, and not require the parens as in ($thing but Role1) but Role2

Actual Behavior

Operators 'but' and 'but' are non-associative and require parentheses


This is Rakudo Star version 2018.10 built on MoarVM version 2018.10

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.