@@ -146,6 +146,13 @@ vector<YulString> AsmAnalyzer::operator()(Identifier const& _identifier)
146146 }
147147 }))
148148 {
149+ if (m_resolver)
150+ // We found a local reference, make sure there is no external reference.
151+ m_resolver (
152+ _identifier,
153+ yul::IdentifierContext::NonExternal,
154+ m_currentScope->insideFunction ()
155+ );
149156 }
150157 else
151158 {
@@ -308,7 +315,7 @@ vector<YulString> AsmAnalyzer::operator()(FunctionCall const& _funCall)
308315
309316 validateInstructions (_funCall);
310317 }
311- else if (! m_currentScope->lookup (_funCall.functionName .name , GenericVisitor{
318+ else if (m_currentScope->lookup (_funCall.functionName .name , GenericVisitor{
312319 [&](Scope::Variable const &)
313320 {
314321 m_errorReporter.typeError (
@@ -323,6 +330,16 @@ vector<YulString> AsmAnalyzer::operator()(FunctionCall const& _funCall)
323330 returnTypes = &_fun.returns ;
324331 }
325332 }))
333+ {
334+ if (m_resolver)
335+ // We found a local reference, make sure there is no external reference.
336+ m_resolver (
337+ _funCall.functionName ,
338+ yul::IdentifierContext::NonExternal,
339+ m_currentScope->insideFunction ()
340+ );
341+ }
342+ else
326343 {
327344 if (!validateInstructions (_funCall))
328345 m_errorReporter.declarationError (
@@ -539,6 +556,14 @@ void AsmAnalyzer::checkAssignment(Identifier const& _variable, YulString _valueT
539556 bool found = false ;
540557 if (Scope::Identifier const * var = m_currentScope->lookup (_variable.name ))
541558 {
559+ if (m_resolver)
560+ // We found a local reference, make sure there is no external reference.
561+ m_resolver (
562+ _variable,
563+ yul::IdentifierContext::NonExternal,
564+ m_currentScope->insideFunction ()
565+ );
566+
542567 if (!holds_alternative<Scope::Variable>(*var))
543568 m_errorReporter.typeError (2657_error, _variable.debugData ->location , " Assignment requires variable." );
544569 else if (!m_activeVariables.count (&std::get<Scope::Variable>(*var)))
0 commit comments