]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: replace "typechecking loop" by nicer errors in some cases.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Sun, 7 Oct 2012 15:35:21 +0000 (17:35 +0200)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Sun, 7 Oct 2012 15:35:21 +0000 (17:35 +0200)
commit892fa3ae6c2d70fa1554ac2c817adfbe3c4c0c50
treeed4d384a6306ddc7b78f851f8d8241d3adbcf1de
parent87c35d8df1607c0a13840390bee5e1de3eb7838a
cmd/gc: replace "typechecking loop" by nicer errors in some cases.

For issue 3757:
BEFORE:  test/fixedbugs/bug463.go:12: typechecking loop involving a
             test/fixedbugs/bug463.go:12 a
             test/fixedbugs/bug463.go:12 <node DCLCONST>
AFTER:   test/fixedbugs/bug463.go:12: constant definition loop
             test/fixedbugs/bug463.go:12: a uses a

For issue 3937:
BEFORE: test/fixedbugs/bug464.go:12: typechecking loop involving foo
            test/fixedbugs/bug464.go:12 <T>
            test/fixedbugs/bug464.go:12 foo
            test/fixedbugs/bug464.go:12 <node DCLFUNC>
AFTER:  test/fixedbugs/bug464.go:12: foo is not a type

Fixes #3757.
Fixes #3937.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6614058
src/cmd/gc/typecheck.c
test/fixedbugs/bug463.go [new file with mode: 0644]
test/fixedbugs/bug464.go [new file with mode: 0644]