Spoke too soon. The issue is the Nil return type constraint. Golfed:

<Zoffix> m: sub (-->Nil) { fail "{42}"; }()
<camelia> rakudo-moar a09c8d: OUTPUT«Use of Nil in string context␤  in sub  at 
<tmp> line 1␤␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 
1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»


On Thu Oct 13 18:31:07 2016, c...@zoffix.com wrote:
> 
> <Zoffix> Hm. Found a strange bug in core that I can't reproduce.
> <Zoffix> m: Bag.new-from-pairs: 1 => -1;
>   <camelia> rakudo-moar a09c8d: OUTPUT«Use of Nil in string context␤
> in
>   block <unit> at <tmp> line 1␤Use of Nil in string context␤  in block
>   <unit> at <tmp> line 1␤Found negative values for  in ␤  in block
>   <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at
> <tmp>
> l…»
>   <Zoffix> Those Nils? It's the two interpolated blocks on this line:
> https://github.com/rakudo/rakudo/blob/a09c8dc99ef7ae60876ad7a7cc478f7e303eb804/src/core/Baggy.pm#L48
>   <Zoffix> If I change it to this: my $wat = @toolow.join:  ' '; my
>   $name = self.^name; fail "Found negative values for $wat in $name"
> if
> @toolow;      then the bug goes away.
>   <Zoffix> m: role Foo { method !meow { my @meows = <foo bar ber>;
> fail
>   "some {@meows}" if @meows; }; method moo { self!meow; 42 } }; class
> ::
> does Foo {}.moo
>   <camelia> rakudo-moar a09c8d: OUTPUT«some foo bar ber␤  in method
> meow
>   at <tmp> line 1␤  in method moo at <tmp> line 1␤  in block <unit> at
>   <tmp> line 1␤␤Actually thrown at:␤  in method moo at <tmp> line 1␤
> in
> block <unit> at <tmp> line 1␤␤»
> <Zoffix> But can't reproduce it ^ :/
> 
> https://irclog.perlgeek.de/perl6-dev/2016-10-14#i_13399643



Reply via email to