Skip to content

Conversation

grantnelson-wf
Copy link
Collaborator

@grantnelson-wf grantnelson-wf commented Apr 30, 2024

This is a fix for #1300

Now that externalization work better for nil or zero to null (done in #1194 as part of #617), we need to be able to internalize null values into nil or zero. Currently we get an exception because internalization isn't expecting a null value for a slice or array.

Internalization of an externalized array creates a copy making the value unassignable (see #1302). Until that is fixed, trying to internalize a null array will simply throw an exception. This is favorable over returning a zero value which will quietly hide the array problem and still not be assignable.

@grantnelson-wf grantnelson-wf marked this pull request as ready for review April 30, 2024 17:01
@grantnelson-wf grantnelson-wf marked this pull request as draft May 1, 2024 18:28
@grantnelson-wf grantnelson-wf marked this pull request as ready for review May 1, 2024 19:23
@grantnelson-wf grantnelson-wf requested a review from nevkontakte May 2, 2024 19:03
@grantnelson-wf grantnelson-wf requested a review from flimzy May 3, 2024 15:11
@nevkontakte nevkontakte merged commit 3b5c01e into gopherjs:master May 6, 2024
@grantnelson-wf grantnelson-wf deleted the internalizingNulls branch May 6, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants