Add regression test for #10989

This commit is contained in:
Ryo Yoshida 2023-04-06 03:39:59 +09:00
parent e8bad53d63
commit 0a2d0b15a1
No known key found for this signature in database
GPG Key ID: E25698A930586171

View File

@ -1802,3 +1802,21 @@ where
"#,
);
}
#[test]
fn match_ergonomics_with_binding_modes_interaction() {
check_types(
r"
enum E { A }
fn foo() {
match &E::A {
b @ (x @ E::A | x) => {
b;
//^ &E
x;
//^ &E
}
}
}",
);
}