Skip to content

Commit

Permalink
simplify message on undef (also revert =:= patch)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimToady committed Jul 3, 2013
1 parent 102c740 commit 85cf51d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions STD.pm6
Expand Up @@ -3126,7 +3126,7 @@ grammar P6 is STD {
[ <?before [ '(' || \h*<sigil><twigil>?\w ] >
<.obs('undef as a verb', 'undefine function or assignment of Nil')>
]?
<.obs('undef as a value', "something more specific:\n\tAny (the \"whatever\" type object),\n\tan undefined type object such as Int,\n\t:!defined as a matcher,\n\tAny:U as a type constraint,\n\tNil as the absense of a value\n\tor fail() as a failure return\n\t ")>
<.obs('undef as a value', "something more specific:\n\tan undefined type object such as Any or Int,\n\t:!defined as a matcher,\n\tAny:U as a type constraint,\n\tNil as the absense of an expected value\n\tor fail() as a failure return\n\t ")>
}

token term:sym<proceed>
Expand Down Expand Up @@ -3831,7 +3831,7 @@ grammar P6 is STD {
my $true = $litbool ~~ /True|Match/;
my $suggest =
$true ?? ':so or *.so or ?*' !!
$litbool ~~ /Nil/ ?? '* =:= Nil or :!defined' !!
$litbool ~~ /Nil/ ?? '* === Nil or :!defined' !!
':!so or *.not or !*';
self.worry("Smartmatch against $litbool always " ~
($true ?? 'matches' !! 'fails') ~
Expand Down

0 comments on commit 85cf51d

Please sign in to comment.