Skip to content

Commit 43069b6

Browse files
committed
Add removed previously sanity check.
1 parent 4240753 commit 43069b6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

libsolidity/analysis/TypeChecker.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3414,6 +3414,16 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
34143414
if (!annotation.isPure.set())
34153415
annotation.isPure = false;
34163416

3417+
if (
3418+
auto const* funcType = dynamic_cast<FunctionType const*>(annotation.type);
3419+
funcType &&
3420+
funcType->kind() != FunctionType::Kind::Declaration &&
3421+
funcType->kind() != FunctionType::Kind::Internal &&
3422+
funcType->kind() != FunctionType::Kind::Error &&
3423+
funcType->kind() != FunctionType::Kind::Event
3424+
)
3425+
solAssert(funcType->isPure() == *annotation.isPure);
3426+
34173427
return false;
34183428
}
34193429

0 commit comments

Comments
 (0)