v2 / vlib / v / checker / tests / cast_to_interface_err.out
25 lines · 25 sloc · 1.0 KB · 9760a9c6b258017ed728d323cbcd3f7016c40c3b
Raw
1vlib/v/checker/tests/cast_to_interface_err.vv:7:5: notice: condition is always true
2 5 | fn foo() !int {
3 6 | // do something
4 7 | if true {
5 | ~~~~
6 8 | return 1
7 9 | }
8vlib/v/checker/tests/cast_to_interface_err.vv:20:9: error: `CustomError` doesn't implement method `msg` of interface `IError`
9 18 |
10 19 | fn my_error() IError {
11 20 | return IError(CustomError{})
12 | ~~~~~~~~~~~~~~~~~~~~~
13 21 | }
14vlib/v/checker/tests/cast_to_interface_err.vv:20:9: error: `CustomError` doesn't implement method `code` of interface `IError`
15 18 |
16 19 | fn my_error() IError {
17 20 | return IError(CustomError{})
18 | ~~~~~~~~~~~~~~~~~~~~~
19 21 | }
20vlib/v/checker/tests/cast_to_interface_err.vv:20:9: error: `CustomError` does not implement interface `IError`, cannot cast `CustomError` to interface `IError`
21 18 |
22 19 | fn my_error() IError {
23 20 | return IError(CustomError{})
24 | ~~~~~~~~~~~~~~~~~~~~~
25 21 | }
26