diff options
author | chriseth <chris@ethereum.org> | 2017-08-28 20:50:18 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-08-28 21:13:02 +0800 |
commit | 122e65f8f496b0b20406cc968a2e48e6434d1a8f (patch) | |
tree | b623153dd3a068c45781e206e7c4b742f8d6cf7f /test/libsolidity | |
parent | d15cde2aa88f39f67025bd40168f219232dad1d6 (diff) | |
download | dexon-solidity-122e65f8f496b0b20406cc968a2e48e6434d1a8f.tar dexon-solidity-122e65f8f496b0b20406cc968a2e48e6434d1a8f.tar.gz dexon-solidity-122e65f8f496b0b20406cc968a2e48e6434d1a8f.tar.bz2 dexon-solidity-122e65f8f496b0b20406cc968a2e48e6434d1a8f.tar.lz dexon-solidity-122e65f8f496b0b20406cc968a2e48e6434d1a8f.tar.xz dexon-solidity-122e65f8f496b0b20406cc968a2e48e6434d1a8f.tar.zst dexon-solidity-122e65f8f496b0b20406cc968a2e48e6434d1a8f.zip |
Crash fix, parseTypeName can return null.
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityParser.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index a39e0958..60ca03c9 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -1602,6 +1602,18 @@ BOOST_AUTO_TEST_CASE(interface) BOOST_CHECK(successParse(text)); } +BOOST_AUTO_TEST_CASE(newInvalidTypeName) +{ + char const* text = R"( + contract C { + function f() { + new var; + } + } + )"; + CHECK_PARSE_ERROR(text, "Expected explicit type name"); +} + BOOST_AUTO_TEST_SUITE_END() } |