Skip to content

Commit 6940b63

Browse files
fix: update pattern test
1 parent 348664e commit 6940b63

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

crates/core/src/matcher/pattern.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,4 +624,14 @@ mod test {
624624
fn test_gh_1087() {
625625
test_match("($P) => $F($P)", "(x) => bar(x)");
626626
}
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+
assert!(pattern.potential_kinds().is_none());
636+
}
627637
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy