diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-15 02:28:15 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-19 17:40:45 +0800 |
commit | 8317eb03838975e5ef5890e68d9d4bc6a4f009eb (patch) | |
tree | c9bfe905056f841814d0364de90881cbd22d5c2b /test | |
parent | 65da8e4e160721cdf8fa86c8112a300d88335792 (diff) | |
download | dexon-solidity-8317eb03838975e5ef5890e68d9d4bc6a4f009eb.tar.gz dexon-solidity-8317eb03838975e5ef5890e68d9d4bc6a4f009eb.tar.zst dexon-solidity-8317eb03838975e5ef5890e68d9d4bc6a4f009eb.zip |
Add test case for bound types without self
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 76141f41..1691b1c5 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -4020,6 +4020,25 @@ BOOST_AUTO_TEST_CASE(invalid_array_as_statement) BOOST_CHECK(expectError(text, false) == Error::Type::TypeError); } +BOOST_AUTO_TEST_CASE(using_directive_for_missing_selftype) +{ + char const* text = R"( + library B { + function b() {} + } + + contract A { + using B for bytes; + + function a() { + bytes memory x; + x.b(); + } + } + )"; + BOOST_CHECK(expectError(text, false) == Error::Type::TypeError); +} + BOOST_AUTO_TEST_SUITE_END() } |