On Sat, 26 Nov 2016 13:19:50 -0800, alex.jakime...@gmail.com wrote: > *Code:* > sub foo(True) { say ‘ok’ }; > foo(False) > > *Result:* > ok > > > The reason for it is the following: > > *Code:* > 42 ~~ True > > *Result:* > Potential difficulties: > Smartmatch against True always matches; if you mean to test the topic > for truthiness, use :so or *.so or ?* instead > at -e:1 > ------> 42 ~~ ⏏True > > > So it is not a bug by itself, it's just how smartmatching works. But we > should definitely print a warning there (or maybe even a compile-time > error?). > > > IRC log: https://irclog.perlgeek.de/perl6/2016-11-26#i_13632723 and > specifically https://irclog.perlgeek.de/perl6/2016-11-26#i_13632798
Thank you for the report. This is now fixed. Fix: https://github.com/rakudo/rakudo/commit/b01dfcda90 Tests: https://github.com/perl6/roast/commit/7095892afe