| 1 | vlib/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 | } |
| 8 | vlib/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 | } |
| 14 | vlib/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 | } |
| 20 | vlib/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 | |