v/vlib/v/checker/tests/infix_err.vv

25 lines
325 B
V

fn f() ?string {
return none
}
fn g() ?int {
return none
}
_ = '' + f()
_ = f() + ''
_ = f() + f()
_ = 4 + g()
_ = int(0) + g() // FIXME not detected
_ = g() + int(3)
_ = g() + 3
// binary operands
_ = 1 && 2
_ = true || 2
// boolean expressions
_ = 1 == 1 && 2 == 2 || 3 == 3
_ = 1 == 1
&& 2 == 2 || 3 == 3
&& 4 == 4