title: InvalidCond layout: article

InvalidCond occurs when an if condition is not a boolean expression.

Example:
 func checkReturn(i int) {
 	if i {
 		panic("non-zero return")
 	}
 }