aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-07-20 04:24:26 +0800
committerGitHub <noreply@github.com>2017-07-20 04:24:26 +0800
commit1274108ac7f209247683c56d75cf7a1a56db7f60 (patch)
tree133a649aa1c2f25545aa81262bf6f72042bee403 /test
parent84f8e7a46712f7da46ac15d378f0de0491278363 (diff)
parenta2a759f79288c95467baf965871891bc59864340 (diff)
downloaddexon-solidity-1274108ac7f209247683c56d75cf7a1a56db7f60.tar.gz
dexon-solidity-1274108ac7f209247683c56d75cf7a1a56db7f60.tar.zst
dexon-solidity-1274108ac7f209247683c56d75cf7a1a56db7f60.zip
Merge pull request #2605 from roadriverrail/this-in-constructor
This in constructor
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()
}