diff options
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index aaf1a449..ef83cc61 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -6536,6 +6536,30 @@ BOOST_AUTO_TEST_CASE(constructor_without_implementation) CHECK_ERROR(text, TypeError, "Constructor must be implemented if declared."); } +BOOST_AUTO_TEST_CASE(calling_unimplemented_internal_functions) +{ + char const* text = R"( + contract C { + function f() internal; + function g() { f(); } + } + )"; + CHECK_SUCCESS_NO_WARNINGS(text); +} + +BOOST_AUTO_TEST_CASE(calling_unimplemented_internal_library_functions) +{ + char const* text = R"( + library L { + function f() internal; + } + contract C { + function g() { L.f(); } + } + )"; + CHECK_ERROR(text, TypeError, "Inlined library function is lacking implementation."); +} + BOOST_AUTO_TEST_SUITE_END() } |