develooper Front page | perl.perl6.compiler | Postings from January 2011

[perl #72580] [BUG] Bool enum values don't smartmatch against Int in Rakudo

From:
Will Coleda via RT
Date:
January 30, 2011 22:22
Subject:
[perl #72580] [BUG] Bool enum values don't smartmatch against Int in Rakudo
Message ID:
rt-3.6.HEAD-20807-1296454958-114.72580-15-0@perl.org
On Sat Feb 06 08:22:31 2010, masak wrote:
> <TimToady> rakudo: enum X <a b c>; say a ~~ Int; say True ~~ Int   # buglet
> <p6eval> rakudo 1d4928: OUTPUT«1␤0␤»
> <jnthn> Aye.
> <jnthn> Quick! Masak!
> <jnthn> :-)
> <masak> what? what? :)
> * masak submits TimToady++'s rakudobuglet
> <masak> oh, I see now! True is (supposed to be) an enum too.
> <masak> an enum value.
> <TimToady> yeah

The output has changed to:

01:21 <[Coke]> rakudo: enum X <a b c>; say a ~~ Int; say True ~~ Int # buglet
01:21 <p6eval> rakudo 549d2a: OUTPUT«Bool::True␤Bool::False␤»

but the second value should be true too.

-- 
Will "Coke" Coleda



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About