mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Qualified lookups return params
This commit is contained in:
parent
96e2d32fa6
commit
9d26adb228
6 changed files with 112 additions and 42 deletions
|
@ -1884,19 +1884,23 @@ fn canonicalize_var_lookup(
|
|||
// Since module_name was nonempty, this is a qualified var.
|
||||
// Look it up in the env!
|
||||
match env.qualified_lookup(scope, module_name, ident, region) {
|
||||
Ok(symbol) => {
|
||||
Ok(lookedup_symbol) => {
|
||||
output
|
||||
.references
|
||||
.insert_value_lookup(symbol, QualifiedReference::Qualified);
|
||||
.insert_value_lookup(lookedup_symbol.symbol, QualifiedReference::Qualified);
|
||||
|
||||
if scope.abilities_store.is_ability_member_name(symbol) {
|
||||
if scope
|
||||
.abilities_store
|
||||
.is_ability_member_name(lookedup_symbol.symbol)
|
||||
{
|
||||
// todo(agus): params for abilities?
|
||||
AbilityMember(
|
||||
symbol,
|
||||
lookedup_symbol.symbol,
|
||||
Some(scope.abilities_store.fresh_specialization_id()),
|
||||
var_store.fresh(),
|
||||
)
|
||||
} else {
|
||||
Var(symbol, var_store.fresh())
|
||||
Var(lookedup_symbol, var_store.fresh())
|
||||
}
|
||||
}
|
||||
Err(problem) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue