aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-08-15 21:52:24 +0800
committerchriseth <chris@ethereum.org>2018-08-15 22:06:48 +0800
commita34735016c63f7ea3ce915de51b797bf6a3b1d4e (patch)
treef2bb7985ecac003337bd14cdd4d6bb72d756b632
parented5265598baf629e2c36ae7d2f7d2913024fe4d8 (diff)
downloaddexon-solidity-a34735016c63f7ea3ce915de51b797bf6a3b1d4e.tar
dexon-solidity-a34735016c63f7ea3ce915de51b797bf6a3b1d4e.tar.gz
dexon-solidity-a34735016c63f7ea3ce915de51b797bf6a3b1d4e.tar.bz2
dexon-solidity-a34735016c63f7ea3ce915de51b797bf6a3b1d4e.tar.lz
dexon-solidity-a34735016c63f7ea3ce915de51b797bf6a3b1d4e.tar.xz
dexon-solidity-a34735016c63f7ea3ce915de51b797bf6a3b1d4e.tar.zst
dexon-solidity-a34735016c63f7ea3ce915de51b797bf6a3b1d4e.zip
Add syntax test for ``address.staticcall.value``.
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index fbb2f09c..387505a5 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -449,6 +449,21 @@ BOOST_AUTO_TEST_CASE(address_staticcall)
CHECK_ERROR(sourceCode, TypeError, "\"staticcall\" is not supported by the VM version.");
}
+BOOST_AUTO_TEST_CASE(address_staticcall_value)
+{
+ if (dev::test::Options::get().evmVersion().hasStaticCall())
+ {
+ char const* sourceCode = R"(
+ contract C {
+ function f() public view {
+ address(0x4242).staticcall.value;
+ }
+ }
+ )";
+ CHECK_ERROR(sourceCode, TypeError, "Member \"value\" not found or not visible after argument-dependent lookup");
+ }
+}
+
BOOST_AUTO_TEST_SUITE_END()
}