Source file test/prove_invert_loop_with_unused_iterators.go

     1  // errorcheck -0 -d=ssa/prove/debug=1
     2  
     3  //go:build amd64
     4  
     5  package main
     6  
     7  func invert(b func(), n int) {
     8  	for i := 0; i < n; i++ { // ERROR "(Inverted loop iteration|Induction variable: limits \[0,\?\), increment 1)"
     9  		b()
    10  	}
    11  }
    12  

View as plain text