We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 348664e commit 6940b63Copy full SHA for 6940b63
crates/core/src/matcher/pattern.rs
@@ -624,4 +624,14 @@ mod test {
624
fn test_gh_1087() {
625
test_match("($P) => $F($P)", "(x) => bar(x)");
626
}
627
+
628
+ #[test]
629
+ fn test_template_pattern_have_no_kinds() {
630
+ let pattern = Pattern::new("$A = $B", Tsx).with_strictness(MatchStrictness::Template);
631
+ assert!(pattern.potential_kinds().is_none());
632
+ let pattern = Pattern::contextual("{a: b}", "pair", Tsx)
633
+ .expect("should create template pattern")
634
+ .with_strictness(MatchStrictness::Template);
635
636
+ }
637
0 commit comments