From 42856e0f53c1cb9be61e9f24b9f09a7b0179cd55 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 22 Feb 2018 01:00:26 +0100 Subject: Add assertion for boolean literals in Julia-mode --- libsolidity/inlineasm/AsmAnalysis.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libsolidity/inlineasm/AsmAnalysis.cpp b/libsolidity/inlineasm/AsmAnalysis.cpp index e672d5ef..a05ac57d 100644 --- a/libsolidity/inlineasm/AsmAnalysis.cpp +++ b/libsolidity/inlineasm/AsmAnalysis.cpp @@ -90,6 +90,11 @@ bool AsmAnalyzer::operator()(assembly::Literal const& _literal) ); return false; } + else if (_literal.kind == assembly::LiteralKind::Boolean) + { + solAssert(m_flavour == AsmFlavour::IULIA, ""); + solAssert(_literal.value == "true" || _literal.value == "false", ""); + } m_info.stackHeightInfo[&_literal] = m_stackHeight; return true; } -- cgit v1.2.3