fmt: fix ?void format error, add _keep.vv test
parent
ffafeac0f8
commit
962bbf1c60
|
@ -0,0 +1,9 @@
|
|||
fn tt() ? {
|
||||
return error('error')
|
||||
}
|
||||
|
||||
fn main() {
|
||||
tt() or {
|
||||
panic('$err')
|
||||
}
|
||||
}
|
|
@ -707,7 +707,11 @@ pub fn (table &Table) type_to_str(t Type) string {
|
|||
res = strings.repeat(`&`, nr_muls) + res
|
||||
}
|
||||
if t.flag_is(.optional) {
|
||||
res = '?' + res
|
||||
if sym.kind == .void {
|
||||
res = '?'
|
||||
} else {
|
||||
res = '?' + res
|
||||
}
|
||||
}
|
||||
/*
|
||||
if res.starts_with(cur_mod +'.') {
|
||||
|
|
Loading…
Reference in New Issue