Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make ~~ S/// message a bit simpler and more helpful
Zoffix++, AlexDaniel++
  • Loading branch information
timo committed Jan 5, 2016
1 parent 49fcd53 commit ac4f9f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/Actions.nqp
Expand Up @@ -6317,7 +6317,7 @@ class Perl6::Actions is HLL::Actions does STDActions {

sub check_smartmatch($/,$pat) {
if nqp::can($pat,'ann') && $pat.ann('is_S') {
$/.PRECURSOR.worry("Smartmatch with S/// can never succeed because the subsequent string match will fail");
$/.PRECURSOR.worry('Smartmatch with S/// can never succeed because the string it returns will fail to match. You can use given instead of ~~.');
}

if $pat ~~ QAST::WVal && istype($pat.returns, $*W.find_symbol(['Bool'])) && nqp::isconcrete($pat.value) {
Expand Down

0 comments on commit ac4f9f8

Please sign in to comment.