diff options
author | chriseth <c@ethdev.com> | 2015-02-06 19:08:24 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-02-06 19:08:24 +0800 |
commit | 16fc2d651e1a96e3f86d98a8b3fb1fa43c9b20c1 (patch) | |
tree | 0883099a967a50b4683bad4aeaabc7a588593910 /AST.cpp | |
parent | 59a390937637111ebdadf2d3af57122a10bdd012 (diff) | |
parent | 7267afff55957b6c8ef113a85e20474c923f795c (diff) | |
download | dexon-solidity-16fc2d651e1a96e3f86d98a8b3fb1fa43c9b20c1.tar.gz dexon-solidity-16fc2d651e1a96e3f86d98a8b3fb1fa43c9b20c1.tar.zst dexon-solidity-16fc2d651e1a96e3f86d98a8b3fb1fa43c9b20c1.zip |
Merge pull request #963 from guanqun/disallow-void-var
Disallow implicit declaration of void type.
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -383,6 +383,8 @@ void VariableDefinition::checkTypeRequirements() BOOST_THROW_EXCEPTION(m_value->createTypeError("Invalid integer constant " + type->toString())); type = intType; } + else if (type->getCategory() == Type::Category::VOID) + BOOST_THROW_EXCEPTION(m_variable->createTypeError("var cannot be void type")); m_variable->setType(type); } } |