Skip to content

Commit 9b3f9d9

Browse files
author
Jakub Wieczorek
committed
Change exhaustiveness analysis to permit multiple constructors per pattern
Slice patterns are different from the rest in that a single slice pattern does not have a distinct constructor if it contains a variable-length subslice pattern. For example, the pattern [a, b, ..tail] can match a slice of length 2, 3, 4 and so on. As a result, the decision tree for exhaustiveness and redundancy analysis should explore each of those constructors separately to determine if the pattern could be useful when specialized for any of them.
1 parent ca2778e commit 9b3f9d9

File tree

5 files changed

+413
-204
lines changed

5 files changed

+413
-204
lines changed

0 commit comments

Comments
 (0)