aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index 587f1075..f5768022 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -4746,7 +4746,19 @@ BOOST_AUTO_TEST_CASE(internal_function_type_to_address)
}
}
)";
- CHECK_ERROR(text, TypeError, "");
+ CHECK_ERROR(text, TypeError, "Explicit type conversion not allowed");
+}
+
+BOOST_AUTO_TEST_CASE(external_function_type_to_uint)
+{
+ char const* text = R"(
+ contract C {
+ function f() returns (uint) {
+ return uint(this.f);
+ }
+ }
+ )";
+ CHECK_ERROR(text, TypeError, "Explicit type conversion not allowed");
}
BOOST_AUTO_TEST_CASE(invalid_fixed_point_literal)