E1047: pattern repeated in a case
Two branches of one case have the same pattern.
Two branches of one case have the same pattern. The second one can never
run, because the first one always matches first. Most often one of them was
meant to be another variant or value. The message shows the pattern, and the
error points at the second branch. Repeating a field name inside one pattern
is the same error.
Example
actus
Fix
Remove the repeated branch, or change it to the pattern it was meant to be.
actus check --format json offers this as a fix: remove the repeated arm, with its trailing comma and the line break before it (a review fix, because it deletes code).
actus
Run actus explain E1047 in your terminal to read this entry offline. Browse Ownership & types or all error codes.