]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1] cmd/gc: fix type checking loop
authorRuss Cox <rsc@golang.org>
Wed, 13 Jun 2012 20:24:51 +0000 (16:24 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 13 Jun 2012 20:24:51 +0000 (16:24 -0400)
commit0d5061ac952257fd3d9608cb1ca1d4a1534d5ed3
treef5eeef06ee800e94743933d0e669247015cb912d
parent61364c1b977017e9cbe2afc89e87c9f6bdaf9a47
[release-branch.go1] cmd/gc: fix type checking loop

««« backport e69400ace361
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