aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-02-06 03:06:04 +0800
committerRhett Aultman <roadriverrail@gmail.com>2017-07-19 22:19:01 +0800
commite506129aee5745e2b7bc8f4b96dcaa8adcc2c2ea (patch)
tree3e98792a84c9f4c026441f1c130737bcdf1f47ac /test
parentb3db1c361cc030aa76bec8184a59e05d192c2397 (diff)
downloaddexon-solidity-e506129aee5745e2b7bc8f4b96dcaa8adcc2c2ea.tar
dexon-solidity-e506129aee5745e2b7bc8f4b96dcaa8adcc2c2ea.tar.gz
dexon-solidity-e506129aee5745e2b7bc8f4b96dcaa8adcc2c2ea.tar.bz2
dexon-solidity-e506129aee5745e2b7bc8f4b96dcaa8adcc2c2ea.tar.lz
dexon-solidity-e506129aee5745e2b7bc8f4b96dcaa8adcc2c2ea.tar.xz
dexon-solidity-e506129aee5745e2b7bc8f4b96dcaa8adcc2c2ea.tar.zst
dexon-solidity-e506129aee5745e2b7bc8f4b96dcaa8adcc2c2ea.zip
Add test and changelog
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index 649e7970..37d0f107 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -4506,7 +4506,7 @@ BOOST_AUTO_TEST_CASE(var_handle_divided_integers)
}
}
)";
- CHECK_SUCCESS(text);
+ CHECK_SUCCESS(text);
}
BOOST_AUTO_TEST_CASE(rational_bitnot_unary_operation)
@@ -6373,6 +6373,20 @@ BOOST_AUTO_TEST_CASE(modifiers_access_storage_pointer)
CHECK_SUCCESS_NO_WARNINGS(text);
}
+BOOST_AUTO_TEST_CASE(using_this_in_constructor)
+{
+ char const* text = R"(
+ contract C {
+ function C() {
+ this.f();
+ }
+ function f() {
+ }
+ }
+ )";
+ CHECK_WARNING(text, "\"this\" used in constructor");
+}
+
BOOST_AUTO_TEST_SUITE_END()
}