Fixes #45594.
Change-Id: I2fcc784e6908403dd96b009546e1ac2f53b9f0e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/314776
Trust: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
if alias {
// type alias declaration
if !check.allowVersion(obj.pkg, 1, 9) {
- check.error(tdecl, "type aliases requires go1.9 or later")
+ if check.conf.CompilerErrorMessages {
+ check.error(tdecl, "type aliases only supported as of -lang=go1.9")
+ } else {
+ check.error(tdecl, "type aliases requires go1.9 or later")
+ }
}
obj.typ = Typ[Invalid]