From 2d9479b06c014b837d64d403ca630a88c275c1c0 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 30 Sep 2020 19:38:01 +0200 Subject: [PATCH] Properly set scope. --- libsolidity/analysis/NameAndTypeResolver.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libsolidity/analysis/NameAndTypeResolver.cpp b/libsolidity/analysis/NameAndTypeResolver.cpp index e2e282587..2f8f0d77f 100644 --- a/libsolidity/analysis/NameAndTypeResolver.cpp +++ b/libsolidity/analysis/NameAndTypeResolver.cpp @@ -130,8 +130,11 @@ bool NameAndTypeResolver::resolveNamesAndTypes(SourceUnit& _source) try { for (shared_ptr const& node: _source.nodes()) + { + setScope(&_source); if (!resolveNamesAndTypesInternal(*node, true)) return false; + } } catch (langutil::FatalError const&) {