blob: 38321d071fb35e9adf1c8664f9c7de6edfab9549 [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
5stderr 'type aliases only supported as of'
6go 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
14stderr 'type aliases only supported as of'
15
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