ferrocene/specification

Type consistency for function parameter patterns

Closed this issue · 1 comments

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) {}

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