aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/ViewPureChecker.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-13 19:03:02 +0800
committerchriseth <chris@ethereum.org>2018-02-13 21:15:02 +0800
commitaea9e7fe549d93436a1eb355258ea1b11b5dfb22 (patch)
tree0dd9e19a1ae44e1245baa03f9ecf9b9a3dfbd206 /test/libsolidity/ViewPureChecker.cpp
parent5916cf1e0ace5d9855af4d785c22c742cf106b8a (diff)
downloaddexon-solidity-aea9e7fe549d93436a1eb355258ea1b11b5dfb22.tar.gz
dexon-solidity-aea9e7fe549d93436a1eb355258ea1b11b5dfb22.tar.zst
dexon-solidity-aea9e7fe549d93436a1eb355258ea1b11b5dfb22.zip
Add tests for selectors for public variables.
Diffstat (limited to 'test/libsolidity/ViewPureChecker.cpp')
-rw-r--r--test/libsolidity/ViewPureChecker.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/libsolidity/ViewPureChecker.cpp b/test/libsolidity/ViewPureChecker.cpp
index 0fee95c5..3a03c877 100644
--- a/test/libsolidity/ViewPureChecker.cpp
+++ b/test/libsolidity/ViewPureChecker.cpp
@@ -330,10 +330,11 @@ BOOST_AUTO_TEST_CASE(selector)
{
string text = R"(
contract C {
+ uint public x;
function f() payable public {
}
function g() pure public returns (bytes4) {
- return this.f.selector;
+ return this.f.selector ^ this.x.selector;
}
}
)";