fix hang from f48e195c31
(fix #10136 TODO test (#3117)) (#3120)
Co-authored-by: Robert Reif <reif@FX6840>
This commit is contained in:
parent
25fa7c55d8
commit
d3d2e16137
|
@ -1812,7 +1812,7 @@ namespace {
|
|||
const ScopeInfo3 * tempScope = this;
|
||||
while (tempScope) {
|
||||
for (const auto & child : tempScope->children) {
|
||||
if (child.name == scope || child.fullName == scope)
|
||||
if (child.type == Record && (child.name == scope || child.fullName == scope))
|
||||
return &child;
|
||||
}
|
||||
|
||||
|
|
|
@ -974,6 +974,33 @@ private:
|
|||
ASSERT_EQUALS(exp, tok(code, true));
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
{
|
||||
const char code[] = "foo::ResultCodes_e\n"
|
||||
"GemImpl::setR(const ::foo::s _ipSource)\n"
|
||||
"{\n"
|
||||
" M3_LOG_EE_DEBUG();\n"
|
||||
" using MLSource = foo::s::Literal;\n"
|
||||
" auto ret = foo::ResultCodes_e::NO_ERROR;\n"
|
||||
" M3_LOG_INFO(\"foo(\" << static_cast<int>(_ipSource) << \")\");\n"
|
||||
" return ret;\n"
|
||||
"}\n"
|
||||
"foo::ResultCodes_e\n"
|
||||
"GemImpl::getF(::foo::s &_ipSource)\n"
|
||||
"{\n"
|
||||
" M3_LOG_EE_DEBUG();\n"
|
||||
" auto ret = foo::ResultCodes_e::NO_ERROR;\n"
|
||||
" return ret;\n"
|
||||
"}\n"
|
||||
"foo::ResultCodes_e\n"
|
||||
"GemImpl::setF(const ::foo::s _ipSource)\n"
|
||||
"{\n"
|
||||
" M3_LOG_EE_DEBUG();\n"
|
||||
" using MLSource = foo::s::Literal;\n"
|
||||
" auto ret = foo::ResultCodes_e::NO_ERROR;\n"
|
||||
" return ret;\n"
|
||||
"}";
|
||||
tok(code, true); // don't crash
|
||||
}
|
||||
}
|
||||
|
||||
void simplifyUsing10171() {
|
||||
|
|
Loading…
Reference in New Issue