aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-02-22 08:00:26 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-02-22 08:02:23 +0800
commit42856e0f53c1cb9be61e9f24b9f09a7b0179cd55 (patch)
tree56c85844ee5455cf35f33e6fcf35aea956836f9a
parentae02bb5aadfa49636f9931524dbc026c855201f1 (diff)
downloaddexon-solidity-42856e0f53c1cb9be61e9f24b9f09a7b0179cd55.tar
dexon-solidity-42856e0f53c1cb9be61e9f24b9f09a7b0179cd55.tar.gz
dexon-solidity-42856e0f53c1cb9be61e9f24b9f09a7b0179cd55.tar.bz2
dexon-solidity-42856e0f53c1cb9be61e9f24b9f09a7b0179cd55.tar.lz
dexon-solidity-42856e0f53c1cb9be61e9f24b9f09a7b0179cd55.tar.xz
dexon-solidity-42856e0f53c1cb9be61e9f24b9f09a7b0179cd55.tar.zst
dexon-solidity-42856e0f53c1cb9be61e9f24b9f09a7b0179cd55.zip
Add assertion for boolean literals in Julia-mode
-rw-r--r--libsolidity/inlineasm/AsmAnalysis.cpp5
1 files changed, 5 insertions, 0 deletions
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;
}