]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] go/types: refuse excessively long constants
authorRob Findley <rfindley@google.com>
Wed, 10 Feb 2021 17:04:31 +0000 (12:04 -0500)
committerRobert Findley <rfindley@google.com>
Sat, 13 Feb 2021 00:39:48 +0000 (00:39 +0000)
commit060fa49bd23d758a9062f4cb50e65960ec9662f1
tree14a573ffc1dfab098ea4ceb275852334d3170ac4
parentbaa6c75dcef23aa51e95bf7818b7ded5262fbaa8
[dev.regabi] go/types: refuse excessively long constants

This is a port of CL 289049 to go/types. In that CL, tests were written
using the ability of tests/run.go to generate test packages dynamically.
For this CL, similar functionality is added to the go/types errmap
tests: tests are refactored to decouple the loading of source code from
the filesystem, so that tests for long constants may be generated
dynamically rather than checked-in as a large testdata file.

Change-Id: I92c7cb61a8d42c6593570ef7ae0af86b501fa34e
Reviewed-on: https://go-review.googlesource.com/c/go/+/290949
Trust: Robert Findley <rfindley@google.com>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/check_test.go
src/go/types/expr.go