]> Cypherpunks repositories - gostls13.git/commit
gc: correctly handle fields of pointer type to recursive forward references
authorLorenzo Stoakes <lstoakes@gmail.com>
Thu, 28 Apr 2011 04:13:49 +0000 (00:13 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 28 Apr 2011 04:13:49 +0000 (00:13 -0400)
commitb6f0632e93d183bc39031c475eb79ef1986bd226
tree1c235dc6e106b86d4f005d4b4e73983daf7f6210
parent370276a3e58c4794e1d604961274859fc6fc2501
gc: correctly handle fields of pointer type to recursive forward references

Previously, whether declaring a type which copied the structure of a type it was referenced in via a pointer field would work depended on whether you declared it before or after the type it copied, e.g. type T2 T1; type T1 struct { F *T2 } would work, however type T1 struct { F *T2 }; type T2 T1 wouldn't.

Fixes #667.

R=rsc
CC=golang-dev
https://golang.org/cl/4313064
src/cmd/gc/dcl.c
src/cmd/gc/go.h
src/cmd/gc/lex.c
src/cmd/gc/typecheck.c
src/cmd/gc/walk.c
test/fixedbugs/bug336.go [new file with mode: 0644]