On Wed, 28 Dec 2016 11:46:28 -0800, c...@zoffix.com wrote:
> Seems regardless of what Junction I use, smartmatch against Bool type
> object always returns false, despite
> individual items smartmatching as true:
> 
> <ZoffixW> m: say True ~~ Bool
> <camelia> rakudo-moar db1836: OUTPUT«True␤»
> <ZoffixW> m: say False ~~ Bool
> <camelia> rakudo-moar db1836: OUTPUT«True␤»
> <ZoffixW> m: say [False, True].all ~~ Bool
> <camelia> rakudo-moar db1836: OUTPUT«False␤»
> <ZoffixW> m: say [False, True].any ~~ Bool
> <camelia> rakudo-moar db1836: OUTPUT«False␤»
> <ZoffixW> m: say [False, True].none ~~ Bool
> <camelia> rakudo-moar db1836: OUTPUT«False␤»
> 
> And despite them smartmatching correctly against some other type
> object, like an Int:
> 
> <ZoffixW> m: say [False, True].none ~~ Int
> <camelia> rakudo-moar db1836: OUTPUT«False␤»
> <ZoffixW> m: say [42].all ~~ Int
> <camelia> rakudo-moar db1836: OUTPUT«True␤»
> <ZoffixW> m: say Bool ~~ Int
> <camelia> rakudo-moar db1836: OUTPUT«True␤»
> <ZoffixW> m: say [False, True].all ~~ Int
> <camelia> rakudo-moar db1836: OUTPUT«True␤»


Thank you for the report. This is now fixed.

Fix: https://github.com/rakudo/rakudo/commit/9fc616f875
Tests: https://github.com/perl6/roast/commit/34ae318971

Reply via email to