From 9fc775269b2ab3eb25ab6f71c6d3a40106cedd97 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 7 Sep 2015 22:43:23 +0200 Subject: [PATCH] Revert "added check for string as mapping key for local var." --- test/libsolidity/SolidityEndToEndTest.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 3bb12f094..3f0217088 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -5188,17 +5188,14 @@ BOOST_AUTO_TEST_CASE(storage_string_as_mapping_key_without_variable) char const* sourceCode = R"( contract Test { mapping(string => uint) data; - function f() returns (uint r, uint rl) { - mapping(string => uint) dataLocal; - dataLocal["abc"] = 2; - rl = dataLocal["abc"]; - data["abc"] = 3; - r = data["abc"]; + function f() returns (uint) { + data["abc"] = 2; + return data["abc"]; } } )"; compileAndRun(sourceCode, 0, "Test"); - BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(3), u256(2))); + BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(2))); } BOOST_AUTO_TEST_SUITE_END()