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

cmd/compile: cannot compile valid (but esoteric) self-recursive interface #22825

Open
griesemer opened this Issue Nov 20, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@griesemer
Contributor

griesemer commented Nov 20, 2017

https://play.golang.org/p/YSkuYfVQHI

Esoteric case. Just for reference.

@griesemer griesemer added this to the Unplanned milestone Nov 20, 2017

@griesemer griesemer self-assigned this Nov 20, 2017

@griesemer

This comment has been minimized.

Contributor

griesemer commented Nov 20, 2017

This is just one case of whole class of errors of recursive types referring to themselves via an array type that depends on the size of an aspect of the recursive type.

A possible general solution might be to defer all array size computations to the end of type-checking, similarly to how we defer map key type-checking to the end.

@golang golang deleted a comment from helpme762 Nov 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment