Type consistency for function parameter patterns
Closed this issue · 1 comments
mattheww commented
The Legality Rules for functions should require that the pattern represented by a FunctionParameterPattern
is compatible with the type represented by the corresponding TypeAscription
.
For example, the rules should say that the following definition is rejected:
fn mismatch((a, b): u32) {}
Veykril commented
This problem is more general, we specify the "expected type" in the context of pattern matching, but we never specify what this type is in the positions where pattern matchings occur