v/vlib/v/tests/unreachable_code_paths_test.v

12 lines
137 B
V

fn test_inside_ternary() {
x := if false {
'foo'
} else if true {
'bar'
} else {
panic('err')
'empty'
}
assert x == 'bar'
}