Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pass nil slice when variadic arguments are omitted after regular args. #1150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2022

Conversation

nevkontakte
Copy link
Member

Previously we would pass an empty slice, which is against the Go spec:

If f is invoked with no actual arguments for p, the value passed to p is nil.

Source: https://go.dev/ref/spec#Passing_arguments_to_..._parameters

Fixes #1147

Previously we would pass an empty slice, which is against the Go spec:

> If f is invoked with no actual arguments for p, the value passed to p
> is nil.

Source: https://go.dev/ref/spec#Passing_arguments_to_..._parameters

Fixes gopherjs#1147
@nevkontakte nevkontakte merged commit 42157da into gopherjs:master Sep 18, 2022
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.

reflect.DeepEqual error for empty slice and variadic
2 participants