1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: fix VUNREACHABLE inside ternary (#10672)

This commit is contained in:
Lukas Neubert
2021-07-05 17:26:01 +02:00
committed by GitHub
parent d307ab2c7c
commit 9e61321d4c
2 changed files with 21 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
fn test_inside_ternary() {
x := if false {
'foo'
} else if true {
'bar'
} else {
panic('err')
'empty'
}
assert x == 'bar'
}