aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/InlineAssembly.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-01-26 20:40:40 +0800
committerchriseth <c@ethdev.com>2017-01-26 20:40:40 +0800
commit525758a130941c6f1dfde8a0f884a550e7a7bb50 (patch)
tree34ac53364bc3aec20a9cc9d324d41721e9143687 /test/libsolidity/InlineAssembly.cpp
parentf62e269115822f791a0ad2e3699815f0725a0ef7 (diff)
downloaddexon-solidity-525758a130941c6f1dfde8a0f884a550e7a7bb50.tar.gz
dexon-solidity-525758a130941c6f1dfde8a0f884a550e7a7bb50.tar.zst
dexon-solidity-525758a130941c6f1dfde8a0f884a550e7a7bb50.zip
Disallow assignment to non-identifiers.
Diffstat (limited to 'test/libsolidity/InlineAssembly.cpp')
-rw-r--r--test/libsolidity/InlineAssembly.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp
index 9ee84867..33721bbf 100644
--- a/test/libsolidity/InlineAssembly.cpp
+++ b/test/libsolidity/InlineAssembly.cpp
@@ -194,6 +194,12 @@ BOOST_AUTO_TEST_CASE(inline_assembly_shadowed_instruction_assignment)
BOOST_CHECK(!successAssemble("{ 2 =: gas }"));
}
+BOOST_AUTO_TEST_CASE(inline_assembly_shadowed_instruction_functional_assignment)
+{
+ // Error message: "Cannot use instruction names for identifier names."
+ BOOST_CHECK(!successAssemble("{ gas := 2 }"));
+}
+
BOOST_AUTO_TEST_SUITE_END()
}