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

invalid recursive type #920

Closed
robpike opened this issue Jul 14, 2010 · 2 comments
Closed

invalid recursive type #920

robpike opened this issue Jul 14, 2010 · 2 comments

Comments

@robpike
Copy link
Contributor

robpike commented Jul 14, 2010

1. What is a short input program that triggers the error?

package main

func main() {
        type X struct { x   []X }
}


2. What is the full compiler output?

x.go:4: invalid recursive type X


3. What version of the compiler are you using?  (Run it with the -V flag.)

8g version 5802+
6g version 5802+


If you take X outside of main(), it compiles
@rsc
Copy link
Contributor

rsc commented Jul 15, 2010

Comment 1:

Owner changed to r...@golang.org.

@rsc
Copy link
Contributor

rsc commented Jul 15, 2010

Comment 2:

This issue was closed by revision 17f90c6.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants