aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-10-15 02:28:15 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-10-19 17:40:45 +0800
commit8317eb03838975e5ef5890e68d9d4bc6a4f009eb (patch)
treec9bfe905056f841814d0364de90881cbd22d5c2b
parent65da8e4e160721cdf8fa86c8112a300d88335792 (diff)
downloaddexon-solidity-8317eb03838975e5ef5890e68d9d4bc6a4f009eb.tar
dexon-solidity-8317eb03838975e5ef5890e68d9d4bc6a4f009eb.tar.gz
dexon-solidity-8317eb03838975e5ef5890e68d9d4bc6a4f009eb.tar.bz2
dexon-solidity-8317eb03838975e5ef5890e68d9d4bc6a4f009eb.tar.lz
dexon-solidity-8317eb03838975e5ef5890e68d9d4bc6a4f009eb.tar.xz
dexon-solidity-8317eb03838975e5ef5890e68d9d4bc6a4f009eb.tar.zst
dexon-solidity-8317eb03838975e5ef5890e68d9d4bc6a4f009eb.zip
Add test case for bound types without self
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp19
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()
}