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

make the unsafe error a warning for now

This commit is contained in:
Alexander Medvednikov 2019-10-21 18:53:55 +03:00
parent 7680d9a23c
commit a29c80ca3d

View File

@ -644,7 +644,7 @@ fn (p mut Parser) async_fn_call(f Fn, method_ph int, receiver_var, receiver_type
// p.tok == fn_name
fn (p mut Parser) fn_call(f mut Fn, method_ph int, receiver_var, receiver_type string) {
if f.is_unsafe && !p.builtin_mod && !p.inside_unsafe {
p.error('you are calling an unsafe function outside of an unsafe block')
p.warn('you are calling an unsafe function outside of an unsafe block')
}
if f.is_deprecated {
p.warn('$f.name is deprecated')