Raku / old-issue-tracker

Tickets from RT
https://github.com/Raku/old-issue-tracker/issues
2 stars 1 forks source link

Incorrectly places '{' in signature incorrectly reports block gobbling #5017

Open p6rt opened 8 years ago

p6rt commented 8 years ago

Migrated from rt.perl.org#127205 (status was 'new')

Searchable as RT127205$

p6rt commented 8 years ago

From @zoffixznet

The error in the code is that '{' for the $y parameter is BEFORE the 'where' instead of after it. The error messages, however, show a different error​:

\ m​: sub foo ( $x where { any \ }, $y { where 42 } ) { }; \ rakudo-moar f1dd49​: OUTPUT«===SORRY!===␤Expression needs parens to avoid gobbling block␤at /tmp/zGERsntt2y​:1␤------> sub foo ( $x where { any \ }⏏, $y { where 42 } ) { };␤Missing block (apparently claimed by expression)␤at /tmp/zGERsntt2y​:1␤------>…» \ m​: sub foo ( $x where { 42 }, $y { where 42 } ) { }; \ rakudo-moar f1dd49​: OUTPUT«===SORRY!===␤Expression needs parens to avoid gobbling block␤at /tmp/gSOsYvX4uK​:1␤------> sub foo ( $x where { 42 }⏏, $y { where 42 } ) { };␤Missing block (apparently claimed by expression)␤at /tmp/gSOsYvX4uK​:1␤------> sub foo …»