From dbde821f995941f2c8b8e4f03d46d3dd2865235e Mon Sep 17 00:00:00 2001 From: Elizabeth Mattijsen Date: Sat, 12 Aug 2023 19:30:44 +0200 Subject: [PATCH] Add sub versions of WHERE WHICH WHO (#5336) 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. --- src/core.c/operators.pm6 | 9 ++++++--- t/02-rakudo/03-corekeys-6c.t | 3 +++ t/02-rakudo/03-corekeys-6d.t | 3 +++ t/02-rakudo/03-corekeys-6e.t | 3 +++ t/02-rakudo/03-corekeys.t | 3 +++ t/02-rakudo/04-settingkeys-6c.t | 3 +++ t/02-rakudo/04-settingkeys-6e.t | 3 +++ t/02-rakudo/07-implementation-detail-6.c.t | 2 +- t/02-rakudo/07-implementation-detail-6.d.t | 2 +- t/02-rakudo/07-implementation-detail-6.e.t | 2 +- 10 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/core.c/operators.pm6 b/src/core.c/operators.pm6 index 0b1e5eba6b3..b3263031710 100644 --- a/src/core.c/operators.pm6 +++ b/src/core.c/operators.pm6 @@ -122,9 +122,12 @@ multi sub infix:(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) { diff --git a/t/02-rakudo/03-corekeys-6c.t b/t/02-rakudo/03-corekeys-6c.t index 9c945601bc9..bde390a9da8 100644 --- a/t/02-rakudo/03-corekeys-6c.t +++ b/t/02-rakudo/03-corekeys-6c.t @@ -80,6 +80,9 @@ my @expected = ( Q{&VAR}, Q{&WHAT}, Q{&WHENEVER}, + Q{&WHERE}, + Q{&WHICH}, + Q{&WHO}, Q{&abs}, Q{&acos}, Q{&acosec}, diff --git a/t/02-rakudo/03-corekeys-6d.t b/t/02-rakudo/03-corekeys-6d.t index ba0ba0d82da..c4ee0588281 100644 --- a/t/02-rakudo/03-corekeys-6d.t +++ b/t/02-rakudo/03-corekeys-6d.t @@ -80,6 +80,9 @@ my @expected = ( Q{&VAR}, Q{&WHAT}, Q{&WHENEVER}, + Q{&WHERE}, + Q{&WHICH}, + Q{&WHO}, Q{&abs}, Q{&acos}, Q{&acosec}, diff --git a/t/02-rakudo/03-corekeys-6e.t b/t/02-rakudo/03-corekeys-6e.t index 27e563caa4d..71a71940afd 100644 --- a/t/02-rakudo/03-corekeys-6e.t +++ b/t/02-rakudo/03-corekeys-6e.t @@ -82,6 +82,9 @@ my @expected = ( Q{&VAR}, Q{&WHAT}, Q{&WHENEVER}, + Q{&WHERE}, + Q{&WHICH}, + Q{&WHO}, Q{&abs}, Q{&acos}, Q{&acosec}, diff --git a/t/02-rakudo/03-corekeys.t b/t/02-rakudo/03-corekeys.t index 613a8d13b76..df76c77eb88 100644 --- a/t/02-rakudo/03-corekeys.t +++ b/t/02-rakudo/03-corekeys.t @@ -83,6 +83,9 @@ my @allowed = Q{&VAR}, Q{&WHAT}, Q{&WHENEVER}, + Q{&WHERE}, + Q{&WHICH}, + Q{&WHO}, Q{&abs}, Q{&acos}, Q{&acosec}, diff --git a/t/02-rakudo/04-settingkeys-6c.t b/t/02-rakudo/04-settingkeys-6c.t index 65eafdc51d1..9836e99b2dc 100644 --- a/t/02-rakudo/04-settingkeys-6c.t +++ b/t/02-rakudo/04-settingkeys-6c.t @@ -79,6 +79,9 @@ my %allowed = ( Q{&VAR}, Q{&WHAT}, Q{&WHENEVER}, + Q{&WHERE}, + Q{&WHICH}, + Q{&WHO}, Q{&abs}, Q{&acos}, Q{&acosec}, diff --git a/t/02-rakudo/04-settingkeys-6e.t b/t/02-rakudo/04-settingkeys-6e.t index 44362d68583..fa4e8c7796f 100644 --- a/t/02-rakudo/04-settingkeys-6e.t +++ b/t/02-rakudo/04-settingkeys-6e.t @@ -79,6 +79,9 @@ my %allowed = ( Q{&VAR}, Q{&WHAT}, Q{&WHENEVER}, + Q{&WHERE}, + Q{&WHICH}, + Q{&WHO}, Q{&abs}, Q{&acos}, Q{&acosec}, diff --git a/t/02-rakudo/07-implementation-detail-6.c.t b/t/02-rakudo/07-implementation-detail-6.c.t index 30cbd31044d..1604a09a207 100644 --- a/t/02-rakudo/07-implementation-detail-6.c.t +++ b/t/02-rakudo/07-implementation-detail-6.c.t @@ -10,7 +10,7 @@ sub non-implementation(\base, \matcher) { .map( *.value.name ) } -my @UPPER = ; +my @UPPER = ; my @lower = ("",<< abs acos acosec acosech acosh acotan acotanh all any append diff --git a/t/02-rakudo/07-implementation-detail-6.d.t b/t/02-rakudo/07-implementation-detail-6.d.t index c0407a2c7a5..ff32800532e 100644 --- a/t/02-rakudo/07-implementation-detail-6.d.t +++ b/t/02-rakudo/07-implementation-detail-6.d.t @@ -10,7 +10,7 @@ sub non-implementation(\base, \matcher) { .map( *.value.name ) } -my @UPPER = ; +my @UPPER = ; my @lower = ("",<< abs acos acosec acosech acosh acotan acotanh all any append diff --git a/t/02-rakudo/07-implementation-detail-6.e.t b/t/02-rakudo/07-implementation-detail-6.e.t index 2f4028b409e..e94d84d699d 100644 --- a/t/02-rakudo/07-implementation-detail-6.e.t +++ b/t/02-rakudo/07-implementation-detail-6.e.t @@ -10,7 +10,7 @@ sub non-implementation(\base, \matcher) { .map( *.value.name ) } -my @UPPER = ; +my @UPPER = ; my @lower = ("",<< abs acos acosec acosech acosh acotan acotanh all any append