Skip to content

Commit

Permalink
simple: limit generic loop copy test to Go 1.20 and newer
Browse files Browse the repository at this point in the history
In Go before 1.20, the compiler (but not go/types) rejects generic type
declarations inside functions. Our tests didn't fail, however, because
the version of Go 1.19 we were testing with had a bug that hid the
compiler error from go/packages, and we actually checked the file
successfully. Fixing that bug in Go (in
c045822e4d7491271c91359a4ff7f333ca5d1ea9) broke the test.
  • Loading branch information
dominikh committed Aug 9, 2023
1 parent 8e32e9b commit cee67be
Showing 1 changed file with 1 addition and 1 deletion.
@@ -1,4 +1,4 @@
//go:build go1.18
//go:build go1.20

package pkg

Expand Down

0 comments on commit cee67be

Please sign in to comment.