On Sun, 20 Jul 2014 10:33:13 -0700, coke wrote:
> S02-names-vars/variables-and-packages.t has several TODO'd tests of
> this sort:
> 
> {
>   nok foo().defined, "get variable not yet declared using a sub (1)";
>   is foo(), 1, "get variable not yet declared using a sub (2)";
>   is foo(), 2, "get variable not yet declared using a sub (3)";
> 
> my $a;
> sub foo { $a++ }
> }
> 
> Where the expectation is that the first call to the foo will return an
> undefined value; in nom, it returns 0.


I reworded the fudges[^1] to test for current behaviour, which IMO is
massively more desirable that to issue warnings any time you numericly
compare a post-incremented anon state var.

[1] https://github.com/perl6/roast/commit/65a0dc5db3

Reply via email to