aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-10-20 07:00:29 +0800
committerGitHub <noreply@github.com>2016-10-20 07:00:29 +0800
commit2bb37f8203d5b64f603d4c7c802407a5500429b5 (patch)
tree4f121a58173f749100af406b297ae31d3cfb17ba /test
parent3bcf0909afca0019841a343ee19ea7dbeef9d667 (diff)
parent06c69c9062e6823e611bb6c24bfdbaf879421d53 (diff)
downloaddexon-solidity-2bb37f8203d5b64f603d4c7c802407a5500429b5.tar.gz
dexon-solidity-2bb37f8203d5b64f603d4c7c802407a5500429b5.tar.zst
dexon-solidity-2bb37f8203d5b64f603d4c7c802407a5500429b5.zip
Merge pull request #1182 from ethereum/inline-assembly-magic-variables
Disallow magic variables in inline assembly
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/InlineAssembly.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp
index 45eceb34..f8655c0c 100644
--- a/test/libsolidity/InlineAssembly.cpp
+++ b/test/libsolidity/InlineAssembly.cpp
@@ -162,6 +162,13 @@ BOOST_AUTO_TEST_CASE(assignment_after_tag)
BOOST_CHECK(successParse("{ let x := 1 { tag: =: x } }"));
}
+BOOST_AUTO_TEST_CASE(magic_variables)
+{
+ BOOST_CHECK(!successAssemble("{ this }"));
+ BOOST_CHECK(!successAssemble("{ ecrecover }"));
+ BOOST_CHECK(successAssemble("{ let ecrecover := 1 ecrecover }"));
+}
+
BOOST_AUTO_TEST_SUITE_END()
}