Skip to content

Commit

Permalink
Add sub versions of WHERE WHICH WHO (#5336)
Browse files Browse the repository at this point in the history
They seem to have been forgotten, but are actually mentioned in
some error messages.  Feels they should be added for completeness
sake.  Also adapts tests accordingly.
  • Loading branch information
lizmat committed Aug 12, 2023
1 parent c1f7e4d commit dbde821
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/core.c/operators.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,12 @@ multi sub infix:<but>(Mu:U \obj, **@roles) {
}

# XXX Wants to be macros when we have them.
only sub WHAT(Mu \x) { x.WHAT }
only sub HOW (Mu \x) { x.HOW }
only sub VAR (Mu \x) { x.VAR }
only sub HOW (Mu \x) { x.HOW }
only sub VAR (Mu \x) { x.VAR }
only sub WHAT(Mu \x) { x.WHAT }
only sub WHERE(Mu \x) { x.WHERE }
only sub WHICH(Mu \x) { x.WHICH }
only sub WHO(Mu \x) { x.WHO }

proto sub infix:<...>(|) {*}
multi sub infix:<...>(\a, Mu \b) {
Expand Down
3 changes: 3 additions & 0 deletions t/02-rakudo/03-corekeys-6c.t
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ my @expected = (
Q{&VAR},
Q{&WHAT},
Q{&WHENEVER},
Q{&WHERE},
Q{&WHICH},
Q{&WHO},
Q{&abs},
Q{&acos},
Q{&acosec},
Expand Down
3 changes: 3 additions & 0 deletions t/02-rakudo/03-corekeys-6d.t
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ my @expected = (
Q{&VAR},
Q{&WHAT},
Q{&WHENEVER},
Q{&WHERE},
Q{&WHICH},
Q{&WHO},
Q{&abs},
Q{&acos},
Q{&acosec},
Expand Down
3 changes: 3 additions & 0 deletions t/02-rakudo/03-corekeys-6e.t
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ my @expected = (
Q{&VAR},
Q{&WHAT},
Q{&WHENEVER},
Q{&WHERE},
Q{&WHICH},
Q{&WHO},
Q{&abs},
Q{&acos},
Q{&acosec},
Expand Down
3 changes: 3 additions & 0 deletions t/02-rakudo/03-corekeys.t
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ my @allowed =
Q{&VAR},
Q{&WHAT},
Q{&WHENEVER},
Q{&WHERE},
Q{&WHICH},
Q{&WHO},
Q{&abs},
Q{&acos},
Q{&acosec},
Expand Down
3 changes: 3 additions & 0 deletions t/02-rakudo/04-settingkeys-6c.t
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ my %allowed = (
Q{&VAR},
Q{&WHAT},
Q{&WHENEVER},
Q{&WHERE},
Q{&WHICH},
Q{&WHO},
Q{&abs},
Q{&acos},
Q{&acosec},
Expand Down
3 changes: 3 additions & 0 deletions t/02-rakudo/04-settingkeys-6e.t
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ my %allowed = (
Q{&VAR},
Q{&WHAT},
Q{&WHENEVER},
Q{&WHERE},
Q{&WHICH},
Q{&WHO},
Q{&abs},
Q{&acos},
Q{&acosec},
Expand Down
2 changes: 1 addition & 1 deletion t/02-rakudo/07-implementation-detail-6.c.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sub non-implementation(\base, \matcher) {
.map( *.value.name )
}

my @UPPER = <DYNAMIC-FALLBACK EVAL EVALFILE HOW NYI RUN-MAIN VAR WHAT>;
my @UPPER = <DYNAMIC-FALLBACK EVAL EVALFILE HOW NYI RUN-MAIN VAR WHAT WHERE WHICH WHO>;

my @lower = ("",<<
abs acos acosec acosech acosh acotan acotanh all any append
Expand Down
2 changes: 1 addition & 1 deletion t/02-rakudo/07-implementation-detail-6.d.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sub non-implementation(\base, \matcher) {
.map( *.value.name )
}

my @UPPER = <DYNAMIC-FALLBACK EVAL EVALFILE HOW NYI RUN-MAIN VAR WHAT>;
my @UPPER = <DYNAMIC-FALLBACK EVAL EVALFILE HOW NYI RUN-MAIN VAR WHAT WHERE WHICH WHO>;

my @lower = ("",<<
abs acos acosec acosech acosh acotan acotanh all any append
Expand Down
2 changes: 1 addition & 1 deletion t/02-rakudo/07-implementation-detail-6.e.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sub non-implementation(\base, \matcher) {
.map( *.value.name )
}

my @UPPER = <DYNAMIC-FALLBACK EVAL EVALFILE HOW NYI RUN-MAIN VAR WHAT>;
my @UPPER = <DYNAMIC-FALLBACK EVAL EVALFILE HOW NYI RUN-MAIN VAR WHAT WHERE WHICH WHO>;

my @lower = ("",<<
abs acos acosec acosech acosh acotan acotanh all any append
Expand Down

0 comments on commit dbde821

Please sign in to comment.