]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: fix type checking loop
authorRuss Cox <rsc@golang.org>
Thu, 7 Jun 2012 07:06:40 +0000 (03:06 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 7 Jun 2012 07:06:40 +0000 (03:06 -0400)
commit6363fc5aa6b3aa1ee8826582c6f7a356aa8e4201
tree22dfa5f23ea6fa0c25f49d48f49b3662812c6fa2
parentf18ced3fc9bdb36029d81eb73a1848959e5a84ec
cmd/gc: fix type checking loop

CL 4313064 fixed its test case but did not address a
general enough problem:

type T1 struct { F *T2 }
type T2 T1
type T3 T2

could still end up copying the definition of T1 for T2
before T1 was done being evaluated, or T3 before T2
was done.

In order to propagate the updates correctly,
record a copy of an incomplete type for re-execution
once the type is completed. Roll back CL 4313064.

Fixes #3709.

R=ken2
CC=golang-dev, lstoakes
https://golang.org/cl/6301059
src/cmd/gc/go.h
src/cmd/gc/lex.c
src/cmd/gc/typecheck.c
test/fixedbugs/bug443.go [new file with mode: 0644]
test/map1.go