aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-11-28 19:23:12 +0800
committerGitHub <noreply@github.com>2018-11-28 19:23:12 +0800
commit5c0331a058b2ee2aed433f9c47106d032ecf2508 (patch)
tree2fd0cc71ac75d4ac1cb2d26ba7883adb7b61f09c /libsolidity
parent7cbf04686442b44b41d7b24800edb8444db31092 (diff)
parent4fa47322f9d6d66c551caa6cfd72c0838dda3dc3 (diff)
downloaddexon-solidity-5c0331a058b2ee2aed433f9c47106d032ecf2508.tar.gz
dexon-solidity-5c0331a058b2ee2aed433f9c47106d032ecf2508.tar.zst
dexon-solidity-5c0331a058b2ee2aed433f9c47106d032ecf2508.zip
Merge pull request #5525 from ethereum/obsoleteComment
Remove obsolete comment.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index 9d536a3a..c41c372b 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -777,15 +777,10 @@ bool TypeChecker::visit(VariableDeclaration const& _variable)
)
m_errorReporter.typeError(_variable.location(), "Variables cannot be declared in interfaces.");
- // Variables can be declared without type (with "var"), in which case the first assignment
- // sets the type.
- // Note that assignments before the first declaration are legal because of the special scoping
- // rules inherited from JavaScript.
-
// type is filled either by ReferencesResolver directly from the type name or by
// TypeChecker at the VariableDeclarationStatement level.
TypePointer varType = _variable.annotation().type;
- solAssert(!!varType, "Failed to infer variable type.");
+ solAssert(!!varType, "Variable type not provided.");
if (_variable.value())
expectType(*_variable.value(), *varType);