.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.1.1 / staticcheck / testdata / src / CheckLoopCondition / CheckLoopCondition.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/staticcheck/testdata/src/CheckLoopCondition/CheckLoopCondition.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/staticcheck/testdata/src/CheckLoopCondition/CheckLoopCondition.go
new file mode 100644 (file)
index 0000000..3d8491d
--- /dev/null
@@ -0,0 +1,16 @@
+package pkg
+
+func fn() {
+       for i := 0; i < 10; i++ {
+               for j := 0; j < 10; i++ { // want `variable in loop condition never changes`
+               }
+       }
+
+       counter := 0
+       for i := 0; i < 10; i++ {
+               for j := 0; j < 10; counter++ {
+                       x := &j
+                       *x++
+               }
+       }
+}