Skip to content
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

runtime: handle conversions from []T to *[N]T #769

Closed
gazerro opened this issue Jun 14, 2021 · 0 comments
Closed

runtime: handle conversions from []T to *[N]T #769

gazerro opened this issue Jun 14, 2021 · 0 comments
Assignees
Labels
needsInvestigation Need to investigate runtime Related to the execution of VM

Comments

@gazerro
Copy link
Member

gazerro commented Jun 14, 2021

The Go 1.17 version allows convertion from []T to *[N]T (issue golang/go#395, CL golang/go@1c26843).

If the length of the slice is less than the length of the array, a run-time error occurs. This means that v.Convert(x.Type()) may panic, even if v.Type().ConvertibleTo(x.Type()) returns true.

@gazerro gazerro added needsInvestigation Need to investigate runtime Related to the execution of VM labels Jun 14, 2021
@gazerro gazerro self-assigned this Jun 14, 2021
@gazerro gazerro changed the title spec: handle conversions from []T to *[N]T runtime: handle conversions from []T to *[N]T Jun 14, 2021
@gazerro gazerro added this to the Public Release milestone Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needsInvestigation Need to investigate runtime Related to the execution of VM
Projects
None yet
Development

No branches or pull requests

1 participant