]> Cypherpunks.ru repositories - gostls13.git/commit
go/types, types2: don't verify infer result if no Config.Error is given
authorRobert Griesemer <gri@golang.org>
Tue, 15 Aug 2023 21:17:02 +0000 (14:17 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 15 Aug 2023 22:07:57 +0000 (22:07 +0000)
commit294e1b260e8fe29d44dad615f6dbf064309d6228
tree612c03c0fbfa965ad6c5308187c48bf26dff1979
parentf2f5979253717ce939d75f57c9f8be3de849a875
go/types, types2: don't verify infer result if no Config.Error is given

With no error handler installed, an error leads to an (internal panic
and) immediate abort of type checking. Not all invariants hold up in
this case, but it also doesn't matter.

In Checker.infer, verify result conditions always if an error handler
is installed, but only then.

Fixes #61938.

Change-Id: I4d3d61bbccc696a75639fee5010f5d3cef17e855
Reviewed-on: https://go-review.googlesource.com/c/go/+/519775
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/infer.go
src/cmd/compile/internal/types2/issues_test.go
src/go/types/infer.go
src/go/types/issues_test.go