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.

(cherry picked from commit cee67be)
  • Loading branch information
dominikh committed Aug 17, 2023
1 parent 2b3ce3c commit 39f8777
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build go1.18
//go:build go1.20

package pkg

Expand Down

0 comments on commit 39f8777

Please sign in to comment.