Merge pull request #5525 from ethereum/obsoleteComment

Remove obsolete comment.
This commit is contained in:
chriseth 2018-11-28 12:23:12 +01:00 committed by GitHub
commit 5c0331a058
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);