mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove special treatment of `var`.
This commit is contained in:
@@ -895,13 +895,16 @@ public:
|
||||
m_isIndexed(_isIndexed),
|
||||
m_mutability(_mutability),
|
||||
m_overrides(std::move(_overrides)),
|
||||
m_location(_referenceLocation) {}
|
||||
m_location(_referenceLocation)
|
||||
{
|
||||
solAssert(m_typeName, "");
|
||||
}
|
||||
|
||||
|
||||
void accept(ASTVisitor& _visitor) override;
|
||||
void accept(ASTConstVisitor& _visitor) const override;
|
||||
|
||||
TypeName* typeName() const { return m_typeName.get(); }
|
||||
TypeName const& typeName() const { return *m_typeName; }
|
||||
ASTPointer<Expression> const& value() const { return m_value; }
|
||||
|
||||
bool isLValue() const override;
|
||||
@@ -964,7 +967,7 @@ protected:
|
||||
Visibility defaultVisibility() const override { return Visibility::Internal; }
|
||||
|
||||
private:
|
||||
ASTPointer<TypeName> m_typeName; ///< can be empty ("var")
|
||||
ASTPointer<TypeName> m_typeName;
|
||||
/// Initially assigned value, can be missing. For local variables, this is stored inside
|
||||
/// VariableDeclarationStatement and not here.
|
||||
ASTPointer<Expression> m_value;
|
||||
|
||||
Reference in New Issue
Block a user