Move unexpected params warning to solve

This commit is contained in:
Agus Zubiaga 2024-07-06 21:36:26 -03:00
parent 63e722f61d
commit 0cbb352a89
No known key found for this signature in database
18 changed files with 115 additions and 169 deletions

View file

@ -4425,15 +4425,12 @@ pub fn with_hole<'a>(
ParamsVar { .. } => {
unimplemented!("module params code generation")
}
ImportParams(loc_expr, _, _) => with_hole(
env,
loc_expr.value,
variable,
procs,
layout_cache,
assigned,
hole,
),
ImportParams(_, _, Some((_, value))) => {
with_hole(env, *value, variable, procs, layout_cache, assigned, hole)
}
ImportParams(_, _, None) => {
internal_error!("Missing module params should've been dropped by now");
}
AbilityMember(member, specialization_id, specialization_var) => {
let specialization_symbol = late_resolve_ability_specialization(
env,
@ -5883,7 +5880,6 @@ pub fn with_hole<'a>(
}
TypedHole(_) => runtime_error(env, "Hit a blank"),
RuntimeError(e) => runtime_error(env, env.arena.alloc(e.runtime_message())),
MissingImportParams(_, _) => runtime_error(env, env.arena.alloc("Missing import params")),
Crash { msg, ret_var: _ } => {
let msg_sym = possible_reuse_symbol_or_specialize(
env,