On Thu, 16 Oct 2014 10:43:27 -0700, masak wrote:
> <masak> I'm about to close
> https://rt.perl.org/Ticket/Display.html?id=118581 (because it no
> longer segfaults).
> <masak> just curious: what *should* this return?
> <masak> m: say \(1) ~~ :(1)
> <camelia> rakudo-moar 329ed9: OUTPUT«True␤»
> <masak> m: say \(1) ~~ :(Int)
> <camelia> rakudo-moar 329ed9: OUTPUT«True␤»
> <masak> m: say \(1) ~~ :(int)
> <camelia> rakudo-moar 329ed9: OUTPUT«True␤»
> <masak> m: say \(1) ~~ :(int $x)
> <camelia> rakudo-moar 329ed9: OUTPUT«True␤»
> <Mouq>  m: say \(1) ~~ :($x as Str)
> <camelia> rakudo-moar 329ed9: OUTPUT«True␤»
> <masak> m: say \(1) ~~ :(int $x as Str)
> <camelia> rakudo-moar 329ed9: OUTPUT«False␤»
> <masak> m: say \(1) ~~ :(int as Str)
> <camelia> rakudo-moar 329ed9: OUTPUT«False␤»
> <masak> yeah, that feels wrong. :)
> * masak closes the old ticket and opens a new one
> <bartolin> sounds good, masak++
> 
> I'd expect the two "False" results above to be "True", for consistency
> with the ones that *are* True.


The `as` syntax is now invalid, but the replacement coercion syntax `say \(1) 
~~ :(Str(Int))` still gives inconsistent results:

<MasterDuke_> m: say \(1) ~~ :(Str(Int))
<+camelia> rakudo-moar b43ed1: OUTPUT: «True␤»
<MasterDuke_> m: say \(1) ~~ :(Str(int))
<+camelia> rakudo-moar b43ed1: OUTPUT: «False␤»
<MasterDuke_> m: say \(1) ~~ :(Int(int))
<+camelia> rakudo-moar b43ed1: OUTPUT: «False␤»
<MasterDuke_> m: say \(1) ~~ :(Int(Int))
<+camelia> rakudo-moar b43ed1: OUTPUT: «True␤»
<MasterDuke_> m: say \(1) ~~ :(int(int))
<+camelia> rakudo-moar b43ed1: OUTPUT: «False␤»
<MasterDuke_> m: say \(1) ~~ :(int(Int))
<+camelia> rakudo-moar b43ed1: OUTPUT: «False␤»
<MasterDuke_> m: say \(1) ~~ :(int)
<+camelia> rakudo-moar b43ed1: OUTPUT: «True␤»
<MasterDuke_> m: say \(1) ~~ :(Int)
<+camelia> rakudo-moar b43ed1: OUTPUT: «True␤»

Reply via email to