mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
all: support [noreturn] fn abc() { for{} }
, mark panic/1 and exit/1with it too. (#10654)
This commit is contained in:
parent
b0b4b8e65b
commit
6aecda3be8
23 changed files with 318 additions and 22 deletions
|
@ -140,6 +140,7 @@ pub fn write(fd i64, buf &byte, count u64) i64 {
|
|||
return x
|
||||
}
|
||||
|
||||
[noreturn]
|
||||
fn bare_panic(msg string) {
|
||||
println('V panic' + msg)
|
||||
exit(1)
|
||||
|
@ -150,6 +151,7 @@ fn bare_backtrace() string {
|
|||
}
|
||||
|
||||
[export: 'exit']
|
||||
[noreturn]
|
||||
fn __exit(code int) {
|
||||
sys_exit(code)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue