Skip to content

Commit a347350

Browse files
ekpyronchriseth
authored andcommitted
Add syntax test for address.staticcall.value.
1 parent ed52655 commit a347350

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎test/libsolidity/SolidityNameAndTypeResolution.cpp‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,21 @@ BOOST_AUTO_TEST_CASE(address_staticcall)
449449
CHECK_ERROR(sourceCode, TypeError, "\"staticcall\" is not supported by the VM version.");
450450
}
451451

452+
BOOST_AUTO_TEST_CASE(address_staticcall_value)
453+
{
454+
if (dev::test::Options::get().evmVersion().hasStaticCall())
455+
{
456+
char const* sourceCode = R"(
457+
contract C {
458+
function f() public view {
459+
address(0x4242).staticcall.value;
460+
}
461+
}
462+
)";
463+
CHECK_ERROR(sourceCode, TypeError, "Member \"value\" not found or not visible after argument-dependent lookup");
464+
}
465+
}
466+
452467
BOOST_AUTO_TEST_SUITE_END()
453468

454469
}

0 commit comments

Comments
 (0)