[Option, Result, Error Handling] support access to other fields than msg and code from err
igotfr opened this issue · 1 comments
igotfr commented
struct MyError {
msg string
value int
code int
}
fn f() ?int {
return IError(MyError{msg: 'Invalid', value: 98})
}
fn main() {
println(f() or { err.value })
}
error: type `IError` has no field named `value`
29 |
30 | fn main() {
31 | println(f() or { err.value })
igotfr commented
related:
vlang/v#12151
vlang/v#12740