# New Ticket Created by Elizabeth Mattijsen
# Please include the string: [perl #127951]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=127951 >
[17:01:04] <lizmat> m: my $a = 42; say $a =:= $a; say $a.WHAT =:= $a.WHAT;
say $a == $a; say $a =:= $a || $a.WHAT =:= $a.WHAT # where does the 1 come
from ???
[17:01:05] <camelia> rakudo-moar fe2be6: OUTPUT«TrueTrueTrue1»
[17:03:18] <jnthn> m: my $a = 42; say $a =:= $a || $a.WHAT =:= $a.WHAT
[17:03:18] <camelia> rakudo-moar fe2be6: OUTPUT«1»
[17:03:29] <jnthn> m: my $a = 42; say ($a =:= $a) || ($a.WHAT =:= $a.WHAT)
[17:03:29] <camelia> rakudo-moar fe2be6: OUTPUT«1»
[17:03:35] <jnthn> m: my $a = 42; say 0 || ($a.WHAT =:= $a.WHAT)
[17:03:35] <camelia> rakudo-moar fe2be6: OUTPUT«True»
[17:03:46] <jnthn> m: my $a = 42; say ($a =:= $a) || (say 'huh')
[17:03:46] <camelia> rakudo-moar fe2be6: OUTPUT«1»
[17:03:57] <jnthn> m: my $a = 42; say $a =:= $a
[17:03:57] <camelia> rakudo-moar fe2be6: OUTPUT«True»
[17:04:01] <jnthn> m: my $a = 42; say ?($a =:= $a)
[17:04:02] <camelia> rakudo-moar fe2be6: OUTPUT«True»
[17:04:19] <jnthn> m: my $a = 42; say do unless $a =:= $a { 'x' }
[17:04:19] <camelia> rakudo-moar fe2be6: OUTPUT«()»
[17:04:25] <jnthn> lizmat: I...have no idea!
[17:04:45] <jnthn> Does it show up with --optimize=off?
[17:04:49] <lizmat> do you agree this is spooky?
[17:04:54] <jnthn> Yes :)
[17:05:26] <jnthn> m: my $a = 42; say (($a =:= $a) or ($a.WHAT =:=
$a.WHAT))
[17:05:26] <camelia> rakudo-moar fe2be6: OUTPUT«1»
[17:05:42] <jnthn> m: my $a = 42; say (($a =:= $a) // ($a.WHAT =:=
$a.WHAT))
[17:05:42] <camelia> rakudo-moar fe2be6: OUTPUT«True»
[17:05:45] <lizmat> indeed, this shows up from optimize=2
[17:06:12] <jnthn> m: use nqp; my $a = 42; say nqp::unless($a =:= $a,
$a.WHAT =:= $a.WHAT)
[17:06:12] <camelia> rakudo-moar fe2be6: OUTPUT«1»
[17:06:15] <lizmat> $ perl6 --optimize=1 -e 'my $a = 42; say $a =:= $a ||
$a.WHAT =:= $a.WHAT'
[17:06:15] <lizmat> True
[17:06:23] <lizmat> $ perl6 --optimize=2 -e 'my $a = 42; say $a =:= $a ||
$a.WHAT =:= $a.WHAT'
[17:06:23] <lizmat> 1
[17:06:32] <jnthn> Well, that isolates it a good bit, then :)
[17:06:44] <lizmat> rakudobug it ?
[17:06:48] <jnthn> yeah
[17:06:52] <lizmat> ok, will do
[17:07:00] <jnthn> I wonder if it's elimiating a nqp::p6bool thinking it's
not needed
[17:08:50] <lizmat> around line 1250 in Optimizer seems to be applicable
[17:08:59] <lizmat> way over my head, though...