Mark branch patterns degenerate when they don't bind symbols body needs

This commit is contained in:
Ayaz Hafiz 2022-07-22 17:26:45 -04:00
parent ed6ee71225
commit 4031770836
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
11 changed files with 110 additions and 32 deletions

View file

@ -221,7 +221,7 @@ fn branch<'a>(c: &Ctx, f: &'a Arena<'a>, b: &'a WhenBranch) -> DocBuilder<'a, Ar
f.intersperse(
patterns
.iter()
.map(|lp| pattern(c, PPrec::Free, f, &lp.value)),
.map(|lp| pattern(c, PPrec::Free, f, &lp.pattern.value)),
f.text(" | "),
)
.append(match guard {