Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some tests were deleted according to the rakudo pull request that
removes the error completely. Let's take a look at the deleted tests
one by one.
The first test checks that 「is default(%h)」 gives “Cannot use
variable $!name in declaration to initialize itself” error. This error
is completely irrelevant to what actually happens. See comments
on RT #121807.
Second test makes sure that 「my $z = $z」 is a compile-time error. It
could be so, but I see no basis for this. This particular case has
never been a problem. All rakudo versions since 2014.01 (which is the
first release of rakudo on moar) result in $z being Any, just like if
you left $z uninitialized.
The last test is the only one that tests for misuse (using
self-referential things with binding). It is based on a 5 year old
ticket that expected some completely different behavior. This code
does not cause rakudo to blow up, but it is still something we should
complain about compile time. After the removal of this error, this
code will now fail during run time because @foo will end up being
Mu. Not too bad, but could be better.
Yet nothing for problematic cases that are caused by what the error is
talking about.
Instead, I've added some tests that check that self-referential
arrays (and other self-referential things) are working correctly.
It would be nice to have some sort of design decision on what should
happen with binding. For example, we can say that getting Mu there is
OK. See RT #87034 for further discussions.