Duplicate pattern in match arms are an unreachable pattern?


It should say something like "duplicate pattern detected". Or is there a meaning to this error? It kinda implies that the matching runs from the top to bottom.

That’s correct. The patterns are checked in order from first to last.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.