mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Report missing params
This commit is contained in:
parent
bc6a84a215
commit
922b1c44ef
16 changed files with 286 additions and 93 deletions
|
@ -595,10 +595,13 @@ pub fn constrain_expr(
|
|||
¶ms.value,
|
||||
expected_params,
|
||||
);
|
||||
let params_con = constraints.import_params(index, *module_id, params.region);
|
||||
let params_con = constraints.import_params(Some(index), *module_id, params.region);
|
||||
let expr_and_params = constraints.and_constraint([expr_con, params_con]);
|
||||
constraints.exists([*var], expr_and_params)
|
||||
}
|
||||
MissingImportParams(module_id, region) => {
|
||||
constraints.import_params(None, *module_id, *region)
|
||||
}
|
||||
&AbilityMember(symbol, specialization_id, specialization_var) => {
|
||||
// Save the expectation in the `specialization_var` so we know what to specialize, then
|
||||
// lookup the member in the environment.
|
||||
|
@ -4136,6 +4139,7 @@ fn is_generalizable_expr(mut expr: &Expr) -> bool {
|
|||
| ExpectFx { .. }
|
||||
| Dbg { .. }
|
||||
| TypedHole(_)
|
||||
| MissingImportParams(_, _)
|
||||
| RuntimeError(..)
|
||||
| ZeroArgumentTag { .. }
|
||||
| Tag { .. }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue