Enum variant type not type checked in pattern matching if the pattern contains variables #6286
Labels
bug
Something isn't working
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
compiler
General compiler. Should eventually become more specific as the issue is triaged
When an enum variant match pattern contains variables, the variant type used within the pattern is not checked against the enum variant type. E.g, this compiles:
If the pattern does not contain variables, errors will be properly reported. E.g., this emits expected type mismatch errors:
But as soon as we have variables, type mismatching is not checked. E.g., this compiles without errors:
The text was updated successfully, but these errors were encountered: