diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-12-03 05:53:36 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-01 20:23:47 +0800 |
commit | ef7add8c2bfacea43aa32455c80ac9575aa46a67 (patch) | |
tree | e04a751aa99c4359f8c08fecedb04bec1645eda6 | |
parent | ce62c7c01c01c859f6b310309a186a966e835d77 (diff) | |
download | dexon-solidity-ef7add8c2bfacea43aa32455c80ac9575aa46a67.tar.gz dexon-solidity-ef7add8c2bfacea43aa32455c80ac9575aa46a67.tar.zst dexon-solidity-ef7add8c2bfacea43aa32455c80ac9575aa46a67.zip |
Add tests for explicity fuction type to address casting
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 472067ec..1aca7ab9 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -4725,6 +4725,18 @@ BOOST_AUTO_TEST_CASE(delete_external_function_type_invalid) CHECK_ERROR(text, TypeError, ""); } +BOOST_AUTO_TEST_CASE(external_function_type_to_address) +{ + char const* text = R"( + contract C { + function f() return (address) { + return address(this.f); + } + } + )"; + CHECK_SUCCESS(text); +} + BOOST_AUTO_TEST_CASE(invalid_fixed_point_literal) { char const* text = R"( |