[go1.20] Added copy from slice to array copy #1332
Merged
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.
The GopherJS transpiler will converts
into
the
$clone
calls the copy method on the array type. The copy method usedsrc.length
that is undefined for a slice. I added to the array type copy method to also allow for conversion from slices into arrays. The secondary$clone
is from the assignment of an array to an array.This will fix the issues in
net/netip
where they are converting slices of different lengths into arrays for ip addresses. This change should fix the last issue in GopherJS Tests so it should pass. Most of CI should pass, butmeasurement_size.yml
will still fail in this PR (it's fixed by another PR).This is part of #1270