aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-02-17 00:50:28 +0800
committerGitHub <noreply@github.com>2017-02-17 00:50:28 +0800
commit0ad8e53404514413761b198f42424cb2c1989b9a (patch)
tree70dae0e10851730c9cb1c447d69c6df82d99be4a /test/libsolidity
parentad751bd3e6f22fadc01d43610ec2e2e008c32f11 (diff)
parentc3c3cccbec058f7f220994da7d272ce41d49d3e8 (diff)
downloaddexon-solidity-0ad8e53404514413761b198f42424cb2c1989b9a.tar.gz
dexon-solidity-0ad8e53404514413761b198f42424cb2c1989b9a.tar.zst
dexon-solidity-0ad8e53404514413761b198f42424cb2c1989b9a.zip
Merge pull request #1701 from ethereum/fixFatalErrors
Fix early exits for fatal errors.
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index 1a4f3cdc..507d9057 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -5079,6 +5079,22 @@ BOOST_AUTO_TEST_CASE(invalid_address_length)
CHECK_WARNING(text, "checksum");
}
+BOOST_AUTO_TEST_CASE(early_exit_on_fatal_errors)
+{
+ // This tests a crash that occured because we did not stop for fatal errors.
+ char const* text = R"(
+ contract C {
+ struct S {
+ ftring a;
+ }
+ S public s;
+ function s() s {
+ }
+ }
+ )";
+ CHECK_ERROR(text, DeclarationError, "Identifier not found or not unique");
+}
+
BOOST_AUTO_TEST_SUITE_END()
}