registered -> registered_info

This commit is contained in:
Shunsuke Shibayama 2022-09-12 00:43:51 +09:00
parent aa65b7eae8
commit c5b0a33d8e
2 changed files with 64 additions and 43 deletions

View file

@ -577,7 +577,12 @@ impl ASTLowerer {
} else {
"<lambda>"
};
if self.ctx.registered(name, def.sig.is_const()) {
if self
.ctx
.registered_info(name, def.sig.is_const())
.map(|(defined, _)| defined.loc() != def.sig.ident().unwrap().loc())
.unwrap_or(false)
{
return Err(LowerError::reassign_error(
line!() as usize,
def.sig.loc(),