]> Cypherpunks repositories - gostls13.git/commit
go/types: don't report cycle error if clearer error follows
authorRobert Griesemer <gri@golang.org>
Mon, 17 Sep 2018 20:43:35 +0000 (13:43 -0700)
committerRobert Griesemer <gri@golang.org>
Mon, 17 Sep 2018 23:08:56 +0000 (23:08 +0000)
commitd97b11f12fb36ae8117519ee983a8f811360ee1a
treebbdc06a8b3ccc8b6a806aedbaf9484385917e7dc
parent36531204f4febd614c249e0bbb05cc1a19d3f227
go/types: don't report cycle error if clearer error follows

If a cyclic declaration uses a non-type object where it expects
a type, don't report the cycle error in favor of the clearer and
more informative error about the missing type.

Fixes #25790.

Change-Id: If937078383def878efb4c69686e5b4b2a495fd5d
Reviewed-on: https://go-review.googlesource.com/135700
Reviewed-by: Alan Donovan <adonovan@google.com>
src/go/types/expr.go
src/go/types/testdata/cycles5.src
src/go/types/testdata/decls0.src
src/go/types/typexpr.go