add broken test for a return that uses //#1
Open
2shortplanks wants to merge 1 commit intoshadow-dot-cat:masterfrom
Open
add broken test for a return that uses //#12shortplanks wants to merge 1 commit intoshadow-dot-cat:masterfrom
2shortplanks wants to merge 1 commit intoshadow-dot-cat:masterfrom
Conversation
Author
|
When I run this test I currently get: |
zmughal
reviewed
Mar 31, 2022
| [ 'my $x; my $y = 3; $x //= $y if $z; say $x;', | ||
| 'my $x; my $y = 3; do { defined($_) or $_ = $y for $x } if $z; say $x;', ], | ||
| [ 'sub foo { return $x // 3 }', | ||
| 'sub foo { return (map +(defined($_) ? $_ : 3)[0], $x) }', ], |
There was a problem hiding this comment.
Should be:
return (map +(defined($_) ? $_ : 3), $x)[0]
|
I've done a little debugging here and I noticed that the then With the second run, the call to A simple fix is to add the line at the beginning of the |
|
@shadowcat-mst, I believe that this is due to duplicates returned by |
|
@2shortplanks, I have added your commit (after the correction) to #6. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.