]> Cypherpunks.ru repositories - gostls13.git/commit
go/types, types2: call mustParse when using mustTypecheck
authorRobert Griesemer <gri@golang.org>
Thu, 27 Apr 2023 23:07:11 +0000 (16:07 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 28 Apr 2023 16:30:57 +0000 (16:30 +0000)
commit972774c4448f41826577304da0b5fd7d6936df4c
treeb4a158d21f4bfac21f051df10920276f774e352b
parent6c8ea391cf7f84f6861e26f27eef3bd8938cfb98
go/types, types2: call mustParse when using mustTypecheck

Syntactically incorrect source files may produce valid (but
unexpected) syntax trees, leading to difficult to understand
test failures.

Make sure to call mustParse when we call mustTypecheck.

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