mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
log: mark log.fatal as [noreturn]
(#16129)
This commit is contained in:
11
examples/logfatal.v
Normal file
11
examples/logfatal.v
Normal file
@ -0,0 +1,11 @@
|
||||
import log
|
||||
|
||||
[noreturn]
|
||||
fn should_not_return(mut logger log.Log) {
|
||||
logger.fatal('${@FILE_LINE}: yikes!')
|
||||
}
|
||||
|
||||
fn main() {
|
||||
mut my_log := log.Log{}
|
||||
should_not_return(mut my_log)
|
||||
}
|
Reference in New Issue
Block a user