go/types: report an error for invalid constant values
The parser reports syntactic errors in constant literals. The go/constant package produces an "unknown" value for syntactically correct numeric constants that are too small or too large. Check for the unknown value and report an error rather than silently continuing. Fixes #42695. Change-Id: I414214559a285d67ed50184dc750f106960b5620 Reviewed-on: https://go-review.googlesource.com/c/go/+/271377 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by:Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org>
Loading
Please sign in to comment