blob: 7e9740fec43763a0727719f623c7ee708e98de97 [file] [log] [blame]
Colin Crossd9c6b802019-03-19 21:10:31 -07001# Test support for go mod -edit to set language version.
2
3env GO111MODULE=on
4! go build
Dan Willemsenbc60c3c2021-12-15 01:09:00 -08005stderr ' type aliases requires'
Colin Crossd9c6b802019-03-19 21:10:31 -07006go mod edit -go=1.9
7grep 'go 1.9' go.mod
8go build
9
Patrice Arruda748609c2020-06-25 12:12:21 -070010# Reverting the version should force a rebuild and error instead of using
11# the cached 1.9 build. (https://golang.org/issue/37804)
12go mod edit -go=1.8
13! go build
Dan Willemsenbc60c3c2021-12-15 01:09:00 -080014stderr 'type aliases requires'
Patrice Arruda748609c2020-06-25 12:12:21 -070015
16
Colin Crossd9c6b802019-03-19 21:10:31 -070017-- go.mod --
18module m
19go 1.8
20
21-- alias.go --
22package alias
23type T = int