Remove obsolete comment.

This commit is contained in:
chriseth 2018-11-28 11:48:51 +01:00
parent 5e55cb1729
commit 4fa47322f9

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