diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-27 03:43:28 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-27 03:43:28 +0800 |
commit | 2a50e869d060bd42faae9003fa563398ba8b79c1 (patch) | |
tree | a0fe4681cc6b659780c871a05be1568d87926984 | |
parent | efadf7e41f73b83f3a7793562cc26f3e92b0211d (diff) | |
download | dexon-solidity-2a50e869d060bd42faae9003fa563398ba8b79c1.tar dexon-solidity-2a50e869d060bd42faae9003fa563398ba8b79c1.tar.gz dexon-solidity-2a50e869d060bd42faae9003fa563398ba8b79c1.tar.bz2 dexon-solidity-2a50e869d060bd42faae9003fa563398ba8b79c1.tar.lz dexon-solidity-2a50e869d060bd42faae9003fa563398ba8b79c1.tar.xz dexon-solidity-2a50e869d060bd42faae9003fa563398ba8b79c1.tar.zst dexon-solidity-2a50e869d060bd42faae9003fa563398ba8b79c1.zip |
Move builtin type list to the top
-rw-r--r-- | libsolidity/inlineasm/AsmAnalysis.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libsolidity/inlineasm/AsmAnalysis.cpp b/libsolidity/inlineasm/AsmAnalysis.cpp index 24eddf05..eeb7d0a6 100644 --- a/libsolidity/inlineasm/AsmAnalysis.cpp +++ b/libsolidity/inlineasm/AsmAnalysis.cpp @@ -38,6 +38,12 @@ using namespace dev; using namespace dev::solidity; using namespace dev::solidity::assembly; +namespace { + +set<string> const builtinTypes{"bool", "u8", "s8", "u32", "s32", "u64", "s64", "u128", "s128", "u256", "s256"}; + +} + bool AsmAnalyzer::analyze(Block const& _block) { if (!(ScopeFiller(m_info.scopes, m_errors))(_block)) @@ -460,7 +466,7 @@ void AsmAnalyzer::expectValidType(string const& type, SourceLocation const& _loc if (!m_julia) return; - if (!(set<string>{"bool", "u8", "s8", "u32", "s32", "u64", "s64", "u128", "s128", "u256", "s256"}).count(type)) + if (!builtinTypes.count(type)) m_errors.push_back(make_shared<Error>( Error::Type::TypeError, "\"" + type + "\" is not a valid type (user defined types are not yet supported).", |