aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/decl.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-04-29 10:02:01 -0700
committerRobert Griesemer <gri@golang.org>2021-04-29 23:41:22 +0000
commita9705e157beb51574233e23cc2e2a412d4681a15 (patch)
tree806bf6aae5bce9f756791fad689aa30c41419e52 /src/cmd/compile/internal/types2/decl.go
parente99dfb0e5cd964c94d946cabeca9856634416737 (diff)
downloadgo-a9705e157beb51574233e23cc2e2a412d4681a15.tar.gz
go-a9705e157beb51574233e23cc2e2a412d4681a15.zip
cmd/compile/internal/types2: slice-to-array-pointer conversion requires go1.17
Add missing version check. Even though this is a new types2 error we separate between the compiler and the types2 error message: we have the compiler error message to match the compiler style, and we have a types2-specific error message to match the types2 style for these kinds of errors (for now). Eventually we need to decide which style we like better and clean this up. Follow-up on https://golang.org/cl/301650. Updates #395. Change-Id: I5b779f345994c66b1f4a4db466466f98b7d3c491 Reviewed-on: https://go-review.googlesource.com/c/go/+/315169 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/decl.go')
-rw-r--r--src/cmd/compile/internal/types2/decl.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/decl.go b/src/cmd/compile/internal/types2/decl.go
index 4966f19892..1333e4c0ec 100644
--- a/src/cmd/compile/internal/types2/decl.go
+++ b/src/cmd/compile/internal/types2/decl.go
@@ -601,7 +601,7 @@ func (check *Checker) typeDecl(obj *TypeName, tdecl *syntax.TypeDecl, def *Named
if alias {
// type alias declaration
- if !check.allowVersion(obj.pkg, 1, 9) {
+ if !check.allowVersion(check.pkg, 1, 9) {
if check.conf.CompilerErrorMessages {
check.error(tdecl, "type aliases only supported as of -lang=go1.9")
} else {