]> Cypherpunks repositories - gostls13.git/commit
go/types: record type information after detecting error
authorRebecca Stambler <rstambler@golang.org>
Thu, 12 Jul 2018 16:52:18 +0000 (12:52 -0400)
committerAlan Donovan <adonovan@google.com>
Thu, 12 Jul 2018 22:12:51 +0000 (22:12 +0000)
commit6f8e8e14c8c860b7da2c3d97a7c92c4bd57e503b
tree9ca1b9035260d1e31bde4259439ca3c4120e142a
parent71d29086486e4f5333e4cf29e973bfd71cf8bdfe
go/types: record type information after detecting error

The existing implementation stops recording type information once it
encounters an error. This results in missing type information that is
needed by various tools. This change handles a few commonly encountered
cases by continuing to check subtrees after errors. Also, add tests for
cases where the package fails to type-check.

Updates #22467

Change-Id: I1bb48d4cb8ae5548dca63bdd785ea2f69329e92b
Reviewed-on: https://go-review.googlesource.com/123578
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/go/types/api_test.go
src/go/types/assignments.go
src/go/types/call.go
src/go/types/expr.go