File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -3801,15 +3801,17 @@ grammar P6 is STD {
3801
3801
3802
3802
token dumbsmart {
3803
3803
[ \h *
3804
- ('True' | 'False' | 'Bool::True' | 'Bool::False' ) < ? before \s >
3804
+ ('True' | 'False' | 'Bool::True' | 'Bool::False' | 'Match' | 'Nil' )
3805
3805
{
3806
3806
my $ litbool = $0 [0 ]. Str ;
3807
- my $ true = $ litbool ~~ /True /;
3807
+ my $ true = $ litbool ~~ /True| Match /;
3808
+ my $ suggest =
3809
+ $ true ?? ' :so or *.so or ?*' !!
3810
+ $ litbool ~~ /Nil / ?? ' * === Nil or :!defined' !!
3811
+ ' :!so or *.not or !*' ;
3808
3812
self . worry(" Smartmatch against $ litbool always " ~
3809
3813
($ true ?? ' matches' !! ' fails' ) ~
3810
- " ; if you mean to test the topic for\n truthiness, please use " ~
3811
- ($ true ?? ' :so or *.so or ?*' !! ' :!so or *.not or !*' ) ~
3812
- ' instead' );
3814
+ " ; perhaps you should use $ suggest instead" );
3813
3815
}
3814
3816
]?
3815
3817
}
You can’t perform that action at this time.
0 commit comments