[perl #131123] [BUG] Useless use of useless use in smartmatch + block + try

2018-01-13 Thread Zoffix Znet via RT
On Sat, 13 Jan 2018 00:09:49 -0800, c...@zoffix.com wrote:
> On Fri, 14 Apr 2017 14:12:54 -0700, fernandocor...@gmail.com wrote:
> > Em Fri, 07 Apr 2017 19:59:42 -0700, c...@zoffix.com escreveu:
> > >
> > >  m: say so 42 ~~ { try $_ == 5 }
> > >  rakudo-moar af50e0: OUTPUT: «WARNINGS for :␤Useless
> > > use
> > > of "==" in expression "$_ == 5" in sink context (line 1)␤False␤»
> > >
> > >  m: say so 42 ~~ { $_ == 5 }
> > >  rakudo-moar af50e0: OUTPUT: «False␤»
> > 
> > 
> > I think the problem is only with block + try...
> > 
> >  m: say {try 5 == 5}()
> >  combined, experimental evalbot rakudo-moar 7f73f9: OUTPUT:
> > «WARNINGS for :␤Useless use of "==" in expression "5 == 5" in
> > sink context (line 1)␤True␤»
> 
> 
> Thank you for the report. This is now fixed.
> 
> Fix:  https://github.com/rakudo/rakudo/commit/728acf597cf31fb
> Test: https://github.com/rakudo/rakudo/commit/728acf597cf31fb


Correction:

Fix:  https://github.com/rakudo/rakudo/commit/ef2dc1b8ba7d45b
Test: https://github.com/rakudo/rakudo/commit/ef2dc1b8ba7d45b


[perl #131123] [BUG] Useless use of useless use in smartmatch + block + try

2018-01-13 Thread Zoffix Znet via RT
On Sat, 13 Jan 2018 00:09:49 -0800, c...@zoffix.com wrote:
> On Fri, 14 Apr 2017 14:12:54 -0700, fernandocor...@gmail.com wrote:
> > Em Fri, 07 Apr 2017 19:59:42 -0700, c...@zoffix.com escreveu:
> > >
> > >  m: say so 42 ~~ { try $_ == 5 }
> > >  rakudo-moar af50e0: OUTPUT: «WARNINGS for :␤Useless
> > > use
> > > of "==" in expression "$_ == 5" in sink context (line 1)␤False␤»
> > >
> > >  m: say so 42 ~~ { $_ == 5 }
> > >  rakudo-moar af50e0: OUTPUT: «False␤»
> > 
> > 
> > I think the problem is only with block + try...
> > 
> >  m: say {try 5 == 5}()
> >  combined, experimental evalbot rakudo-moar 7f73f9: OUTPUT:
> > «WARNINGS for :␤Useless use of "==" in expression "5 == 5" in
> > sink context (line 1)␤True␤»
> 
> 
> Thank you for the report. This is now fixed.
> 
> Fix:  https://github.com/rakudo/rakudo/commit/728acf597cf31fb
> Test: https://github.com/rakudo/rakudo/commit/728acf597cf31fb


Correction:

Fix:  https://github.com/rakudo/rakudo/commit/ef2dc1b8ba7d45b
Test: https://github.com/rakudo/rakudo/commit/ef2dc1b8ba7d45b


[perl #131123] [BUG] Useless use of useless use in smartmatch + block + try

2018-01-13 Thread Zoffix Znet via RT
On Fri, 14 Apr 2017 14:12:54 -0700, fernandocor...@gmail.com wrote:
> Em Fri, 07 Apr 2017 19:59:42 -0700, c...@zoffix.com escreveu:
> >
> >  m: say so 42 ~~ { try $_ == 5 }
> >  rakudo-moar af50e0: OUTPUT: «WARNINGS for :␤Useless
> > use
> > of "==" in expression "$_ == 5" in sink context (line 1)␤False␤»
> >
> >  m: say so 42 ~~ { $_ == 5 }
> >  rakudo-moar af50e0: OUTPUT: «False␤»
> 
> 
> I think the problem is only with block + try...
> 
>  m: say {try 5 == 5}()
>  combined, experimental evalbot rakudo-moar 7f73f9: OUTPUT:
> «WARNINGS for :␤Useless use of "==" in expression "5 == 5" in
> sink context (line 1)␤True␤»


Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/728acf597cf31fb
Test: https://github.com/rakudo/rakudo/commit/728acf597cf31fb


[perl #131123] [BUG] Useless use of useless use in smartmatch + block + try

2018-01-13 Thread Zoffix Znet via RT
On Fri, 14 Apr 2017 14:12:54 -0700, fernandocor...@gmail.com wrote:
> Em Fri, 07 Apr 2017 19:59:42 -0700, c...@zoffix.com escreveu:
> >
> >  m: say so 42 ~~ { try $_ == 5 }
> >  rakudo-moar af50e0: OUTPUT: «WARNINGS for :␤Useless
> > use
> > of "==" in expression "$_ == 5" in sink context (line 1)␤False␤»
> >
> >  m: say so 42 ~~ { $_ == 5 }
> >  rakudo-moar af50e0: OUTPUT: «False␤»
> 
> 
> I think the problem is only with block + try...
> 
>  m: say {try 5 == 5}()
>  combined, experimental evalbot rakudo-moar 7f73f9: OUTPUT:
> «WARNINGS for :␤Useless use of "==" in expression "5 == 5" in
> sink context (line 1)␤True␤»


Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/728acf597cf31fb
Test: https://github.com/rakudo/rakudo/commit/728acf597cf31fb


[perl #131123] [BUG] Useless use of useless use in smartmatch + block + try

2017-04-22 Thread fernandocor...@gmail.com via RT
Em Fri, 14 Apr 2017 14:12:54 -0700, fernandocor...@gmail.com escreveu:
> Em Fri, 07 Apr 2017 19:59:42 -0700, c...@zoffix.com escreveu:
> >
> >  m: say so 42 ~~ { try $_ == 5 }
> >  rakudo-moar af50e0: OUTPUT: «WARNINGS for :␤Useless
> > use
> > of "==" in expression "$_ == 5" in sink context (line 1)␤False␤»
> >
> >  m: say so 42 ~~ { $_ == 5 }
> >  rakudo-moar af50e0: OUTPUT: «False␤»
> 
> 
> I think the problem is only with block + try...
> 
>  m: say {try 5 == 5}()
>  combined, experimental evalbot rakudo-moar 7f73f9: OUTPUT:
> «WARNINGS for :␤Useless use of "==" in expression "5 == 5" in
> sink context (line 1)␤True␤»

try with a block doesn't warn:

 Fernando Corrêa de Oliveira m: say {try {5 == 5}}()
<•camelia> combined, experimental evalbot rakudo-moar 624fe8: OUTPUT: «True␤»


[perl #131123] [BUG] Useless use of useless use in smartmatch + block + try

2017-04-07 Thread via RT
# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #131123]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=131123 >



 m: say so 42 ~~ { try $_ == 5 }
 rakudo-moar af50e0: OUTPUT: «WARNINGS for :␤Useless use of 
"==" in expression "$_ == 5" in sink context (line 1)␤False␤»

 m: say so 42 ~~ { $_ == 5 }
 rakudo-moar af50e0: OUTPUT: «False␤»