env TESTGO_VERSION=go1.22.0

! go mod tidy -go=1.21
stderr '^go: example.net/a@v0.1.0 requires go@1.22, but 1.21 is requested$'

-- go.mod --
module example

go 1.22

require example.net/a v0.1.0

replace example.net/a v0.1.0 => ./a
-- example.go --
package example

import "example.net/a"
-- a/go.mod --
module example.net/a

go 1.22
-- a/a.go --
package a
