1 // Check that coercions are propagated through match and if expressions.
3 // pretty-expanded FIXME #23616
6 let _: Box<[isize]> = if true {
7 let b: Box<_> = Box::new([1, 2, 3]);
10 let b: Box<_> = Box::new([1]);
14 let _: Box<[isize]> = match true {
15 true => { let b: Box<_> = Box::new([1, 2, 3]); b }
16 false => { let b: Box<_> = Box::new([1]); b }
19 // Check we don't get over-keen at propagating coercions in the case of casts.
20 let x = if true { 42 } else { 42u8 } as u16;
21 let x = match true { true => 42, false => 42u8 } as u16;