Open HarmtH opened 5 years ago
Fixed with https://github.com/rakudo/rakudo/commit/ca7408e9fa , tests added with https://github.com/perl6/roast/commit/4e732c620b
I was thinking a bit about this issue and about fix https://github.com/rakudo/rakudo/commit/ca7408e9fa
Wouldn't the array-of-array notation still be broken?
my @a; my $neg=-1; say @a[$neg][0]:exists
True
I think the real issue is Failures 'exist'. Maybe Failures should behave more like Nil. As a Failure is a Nil, that would also make sense. Although I don't know what the language specs say about this.
Failure is a Nil is a Cool is an Any is a Mu
> Failure.new[0]:exists
True
> Nil.new[0]:exists
False
> Cool.new[0]:exists
True
> Any.new[0]:exists
True
> Mu.new[0]:exists
Type check failed in binding to parameter '<anon>'; expected Any but got Mu (Mu.new)
in block <unit> at <unknown file> line 1
The Problem
Expected Behavior
It returns False
Environment
perl6 -v
): This is Rakudo version 2018.11 built on MoarVM version 2018.11 implementing Perl 6.d.