Remove special treatment of `var`.

This commit is contained in:
chriseth
2020-07-20 17:22:04 +02:00
parent f945163909
commit 93c792c696
39 changed files with 272 additions and 535 deletions
+6 -3
View File
@@ -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;