mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5525 from ethereum/obsoleteComment
Remove obsolete comment.
This commit is contained in:
commit
5c0331a058
@ -777,15 +777,10 @@ bool TypeChecker::visit(VariableDeclaration const& _variable)
|
|||||||
)
|
)
|
||||||
m_errorReporter.typeError(_variable.location(), "Variables cannot be declared in interfaces.");
|
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
|
// type is filled either by ReferencesResolver directly from the type name or by
|
||||||
// TypeChecker at the VariableDeclarationStatement level.
|
// TypeChecker at the VariableDeclarationStatement level.
|
||||||
TypePointer varType = _variable.annotation().type;
|
TypePointer varType = _variable.annotation().type;
|
||||||
solAssert(!!varType, "Failed to infer variable type.");
|
solAssert(!!varType, "Variable type not provided.");
|
||||||
|
|
||||||
if (_variable.value())
|
if (_variable.value())
|
||||||
expectType(*_variable.value(), *varType);
|
expectType(*_variable.value(), *varType);
|
||||||
|
Loading…
Reference in New Issue
Block a user