Report unexpected params

This commit is contained in:
Agus Zubiaga 2024-07-01 20:28:36 -03:00
parent db76ab4015
commit bc6a84a215
No known key found for this signature in database
10 changed files with 137 additions and 24 deletions

View file

@ -3173,6 +3173,22 @@ fn to_pending_value_def<'a>(
}
});
match (module_import.params, env.modules_expecting_params.contains(&module_id)) {
(None, true) => {
env.problems.push(Problem::MissingParams {
module_id,
region,
});
}
(Some(import_params), false) => {
env.problems.push(Problem::UnexpectedParams {
module_id,
region: import_params.params.region,
});
}
(None, false) | (Some(_), true) => { /* All good */}
}
if let Err(existing_import) =
scope
.modules