()
| 2141 | #[test] |
| 2142 | fn try_rejects_incompatible_error_type() { |
| 2143 | assert_compile_fails( |
| 2144 | r#" |
| 2145 | parse: () -> Result<i32, i64> { |
| 2146 | return Err(1) |
| 2147 | } |
| 2148 | |
| 2149 | run: () -> Result<i32, i32> { |
| 2150 | value := parse()? |
| 2151 | return Ok(value) |
| 2152 | } |
| 2153 | |
| 2154 | main: () -> i32 { |
| 2155 | return 0 |
| 2156 | } |
| 2157 | "#, |
nothing calls this directly
no test coverage detected