blob: 311a99aafb3b234d3910d86512f05bc6626b2fde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// +build go1.11
package noparse_format //@format("package")
// The nonewvars expectation asserts that the go/analysis framework ran.
// See comments in badstmt.
func what() {
var hi func()
if { hi() //@diag("{", "syntax", "missing condition in if statement", "error")
}
hi := nil //@diag(":=", "nonewvars", "no new variables", "warning")
}
|