Skip to content

Commit

Permalink
Revert "added check for string as mapping key for local var."
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Sep 7, 2015
1 parent 6f4a39c commit 9fc7752
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions test/libsolidity/SolidityEndToEndTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9fc7752

Please sign in to comment.