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" error for non-recursive types #582

Closed
mirtchovski opened this issue Feb 2, 2010 · 13 comments
Closed

"Invalid recursive type" error for non-recursive types #582

mirtchovski opened this issue Feb 2, 2010 · 13 comments

Comments

@mirtchovski
Copy link
Contributor

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1.attempt to compile (6g) the following code:

package main

// this fails with "invalid recursive type test1"
type test1 test2
type test2 int64

// this compiles
//type test2 int64
//type test1 test2
func main () {
    return
}


What is the expected output? What do you see instead?
expected successful compilation; see:
test.go:4: invalid recursive type test1


What is your $GOOS?  $GOARCH?
linux, amd64

Which revision are you using?  (hg identify)
4c468c07d05c tip
(this bug did not occur a few days ago, unsure which revision introduced it)
@adg
Copy link
Contributor

adg commented Feb 2, 2010

Comment 1:

Status changed to Accepted.

@adg
Copy link
Contributor

adg commented Feb 2, 2010

Comment 2:

Status changed to New.

@adg
Copy link
Contributor

adg commented Feb 3, 2010

Comment 3:

Status changed to Accepted.

@adg
Copy link
Contributor

adg commented Feb 3, 2010

Comment 4:

Owner changed to a...@golang.org.

@adg
Copy link
Contributor

adg commented Feb 3, 2010

Comment 5:

I can reproduce this in 4c468c07d05c tip. This is a regression.

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

@rsc
Copy link
Contributor

rsc commented Feb 7, 2010

Comment 6:

Issue #590 has been merged into this issue.

@gopherbot
Copy link
Contributor

Comment 7 by anthony.desnos:

With the latest version of G, I have the following issue : 
desnos@dune:~/go/misc/cgo/gmp$ make
/home/desnos/go/bin/8g -o _go_.8 gmp.cgo1.go _cgo_gotypes.go
gmp.cgo1.go:122: invalid recursive type _C___mpz_struct
gmp.cgo1.go:122: invalid recursive type _C_mp_limb_t
gmp.cgo1.go:146: invalid slice index n (type _C_size_t)
gmp.cgo1.go:152: cannot convert _C_mpz_sizeinbase(&z.i[0], 2) (type _C_size_t) to 
type int in conversion
gmp.cgo1.go:152: cannot use _C_mpz_sizeinbase(&z.i[0], 2) (type _C_size_t) as type 
int in return argument
_cgo_gotypes.go:16: invalid recursive type _C_size_t
make: *** [_go_.8] Erreur 1

@gopherbot
Copy link
Contributor

Comment 8 by anthony.desnos:

no solution ?

@rsc
Copy link
Contributor

rsc commented Feb 12, 2010

Comment 9:

Labels changed: added priority-p1.

@rsc
Copy link
Contributor

rsc commented Feb 12, 2010

Comment 10:

Labels changed: added priority-high, removed priority-p1.

@rsc
Copy link
Contributor

rsc commented Feb 12, 2010

Comment 11:

Labels changed: added compilerbug.

@rsc
Copy link
Contributor

rsc commented Feb 17, 2010

Comment 12:

This issue was closed by revision 7b5789b.

Status changed to Fixed.

Merged into issue #-.

@rsc
Copy link
Contributor

rsc commented Feb 19, 2010

Comment 13:

Issue #581 has been merged into this issue.

@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

4 participants