summaryrefslogtreecommitdiffstats
path: root/src/test/ui/expr/if/if-branch-types.rs
blob: c125ba30606c553df7d36e26fcc98ee78211dfcc (plain)
1
2
3
4
5
fn main() {
    let x = if true { 10i32 } else { 10u32 };
    //~^ ERROR `if` and `else` have incompatible types
    //~| expected `i32`, found `u32`
}