Activate wildcard imports for bare delay identifiers
Bare identifiers used as unparenthesized delays construct `PEIdent` directly. This bypasses wildcard package import activation, so a delay reference after an import can resolve to an outer declaration instead of the imported name. Create the identifier through `pform_new_ident()` so the import becomes visible at the reference's lexical position. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
e4d29bb1c1
commit
101bf5f841
4
parse.y
4
parse.y
|
|
@ -3774,8 +3774,8 @@ delay_value_simple
|
|||
}
|
||||
}
|
||||
| identifier_name
|
||||
{ PEIdent*tmp = new PEIdent(lex_strings.make($1), @1.lexical_pos);
|
||||
FILE_NAME(tmp, @1);
|
||||
{ pform_name_t tmp_name = { name_component_t(lex_strings.make($1)) };
|
||||
auto tmp = pform_new_ident(@1, tmp_name);
|
||||
$$ = tmp;
|
||||
delete[]$1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue