summaryrefslogtreecommitdiffstats
path: root/test/fixedbugs/issue67141.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixedbugs/issue67141.go')
-rw-r--r--test/fixedbugs/issue67141.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/fixedbugs/issue67141.go b/test/fixedbugs/issue67141.go
new file mode 100644
index 0000000..0464d1f
--- /dev/null
+++ b/test/fixedbugs/issue67141.go
@@ -0,0 +1,15 @@
+// errorcheck -lang=go1.22
+
+//go:build go1.21
+
+// We need a line directive before the package clause,
+// but don't change file name or position so that the
+// error message appears at the right place.
+
+//line issue67141.go:10
+package p
+
+func _() {
+ for range 10 { // ERROR "cannot range over 10"
+ }
+}