aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index 4b29243a..de698c77 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -6382,6 +6382,20 @@ BOOST_AUTO_TEST_CASE(using_this_in_constructor)
CHECK_WARNING(text, "\"this\" used in constructor");
}
+BOOST_AUTO_TEST_CASE(do_not_crash_on_not_lalue)
+{
+ // This checks for a bug that caused a crash because of continued analysis.
+ char const* text = R"(
+ contract C {
+ mapping (uint => uint) m;
+ function f() {
+ m(1) = 2;
+ }
+ }
+ )";
+ CHECK_ERROR_ALLOW_MULTI(text, TypeError, "is not callable");
+}
+
BOOST_AUTO_TEST_SUITE_END()
}