Skip to content

Fix not only looking at pattern when trying to find prefix for case#1480

Merged
razzeee merged 3 commits intoelm-tooling:mainfrom
Qluxzz:fix-prefixing-branch
Mar 9, 2026
Merged

Fix not only looking at pattern when trying to find prefix for case#1480
razzeee merged 3 commits intoelm-tooling:mainfrom
Qluxzz:fix-prefixing-branch

Conversation

@Qluxzz
Copy link
Contributor

@Qluxzz Qluxzz commented Mar 8, 2026

The current implementation for adding missing case branches would look for a prefix not only from the pattern but also from the branch expression. This would make it so a prefix was erroneously added when the branch also contained any upper_case_identifiers such as String.length, or in the test case added, Html.text. The updated version makes sure we restrict the lookup to only look at the pattern itself.

Also improves the test case names to clarify what "needed" in the case of a prefix means.

@razzeee razzeee merged commit 95a086a into elm-tooling:main Mar 9, 2026
16 checks passed
@Qluxzz Qluxzz deleted the fix-prefixing-branch branch March 9, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants