mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
markused: skip panic_result_not_set (generated for fn main(){ foo()! }
) too
This commit is contained in:
parent
095f4bcf86
commit
4588bb44ab
@ -244,6 +244,7 @@ pub fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []&ast.F
|
|||||||
all_fn_root_names << 'panic_debug'
|
all_fn_root_names << 'panic_debug'
|
||||||
}
|
}
|
||||||
all_fn_root_names << 'panic_optional_not_set'
|
all_fn_root_names << 'panic_optional_not_set'
|
||||||
|
all_fn_root_names << 'panic_result_not_set'
|
||||||
if pref.is_test {
|
if pref.is_test {
|
||||||
all_fn_root_names << 'main.cb_assertion_ok'
|
all_fn_root_names << 'main.cb_assertion_ok'
|
||||||
all_fn_root_names << 'main.cb_assertion_failed'
|
all_fn_root_names << 'main.cb_assertion_failed'
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
42
|
||||||
|
42
|
@ -0,0 +1,2 @@
|
|||||||
|
42
|
||||||
|
42
|
@ -0,0 +1,14 @@
|
|||||||
|
fn opt() ?int {
|
||||||
|
return 42
|
||||||
|
}
|
||||||
|
|
||||||
|
fn result() !int {
|
||||||
|
return 42
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
o := opt()?
|
||||||
|
r := result()!
|
||||||
|
println(o)
|
||||||
|
println(r)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user