| 1 | fn f() ?int { |
| 2 | return none |
| 3 | } |
| 4 | |
| 5 | fn type_unimplemented_ierror() { |
| 6 | if _ := f() { |
| 7 | } else { |
| 8 | _ = err is int |
| 9 | } |
| 10 | |
| 11 | _ = f() or { |
| 12 | _ = err is int |
| 13 | 0 |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | interface IAbc { |
| 18 | some_method() |
| 19 | } |
| 20 | |
| 21 | struct Struct {} |
| 22 | |
| 23 | fn (s Struct) some_method() {} |
| 24 | |
| 25 | fn type_unimplemented_interface() { |
| 26 | ivalue := IAbc(Struct{}) |
| 27 | _ := ivalue is int |
| 28 | } |
| 29 |