Work on type inference for ADT patterns

This commit is contained in:
Marcus Klaas de Vries
2019-01-16 16:34:33 +01:00
committed by Aleksey Kladov
parent 5648dcd36e
commit 3b0de53904
2 changed files with 32 additions and 3 deletions

View File

@@ -362,7 +362,10 @@ fn test(x: &str, y: isize) {
fn infer_pattern() {
check_inference(
r#"
enum E { A { x: usize }, B }
enum E {
A { x: usize },
B
}
fn test(x: &i32) {
let y = x;