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

ci: fix toml segfault (remove unused low level builtin option IError.msg compatibility hack)

This commit is contained in:
Delyan Angelov 2022-04-11 21:49:52 +03:00
parent e64c8cce62
commit 382586da6d
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -27,15 +27,11 @@ pub fn (err IError) str() string {
else {
// >> Hack to allow old style custom error implementations
// TODO: remove once deprecation period for `IError` methods has ended
old_error_style := unsafe { voidptr(&err.msg) != voidptr(&err.code) } // if fields are not defined (new style) they don't have an offset between
if old_error_style {
'$err.type_name(): $err.msg'
} else {
// old_error_style := unsafe { voidptr(&err.msg) != voidptr(&err.code) } // if fields are not defined (new style) they don't have an offset between
// <<
'$err.type_name(): $err.msg()'
}
}
}
}
// Error is the empty default implementation of `IError`.