diff options
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/Types.cpp | 11 | ||||
-rw-r--r-- | libsolidity/ast/Types.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 25702f19..c97ee657 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -666,7 +666,7 @@ TypePointer IntegerType::binaryOperatorResult(Token::Value _operator, TypePointe return TypePointer(); } - auto commonType = Type::commonType(shared_from_this(), _other); //might be a integer or fixed point + auto commonType = Type::commonType(shared_from_this(), _other); //might be an integer or fixed point if (!commonType) return TypePointer(); @@ -2126,8 +2126,11 @@ bool StructType::canBeUsedExternally(bool _inLibrary) const // passed by value and thus the encoding does not differ, but it will disallow // mappings. for (auto const& var: m_struct.members()) + { + solAssert(var->annotation().type, ""); if (!var->annotation().type->canBeUsedExternally(false)) return false; + } } return true; } @@ -2429,7 +2432,7 @@ FunctionType::FunctionType(VariableDeclaration const& _varDecl): else if (auto arrayType = dynamic_cast<ArrayType const*>(returnType.get())) { if (arrayType->isByteArray()) - // Return byte arrays as as whole. + // Return byte arrays as whole. break; returnType = arrayType->baseType(); m_parameterNames.push_back(""); @@ -2641,8 +2644,8 @@ bool FunctionType::operator==(Type const& _other) const bool FunctionType::isExplicitlyConvertibleTo(Type const& _convertTo) const { - if (m_kind == Kind::External && _convertTo.category() == Category::Address) - return true; + if (m_kind == Kind::External && _convertTo == AddressType::address()) + return true; return _convertTo.category() == category(); } diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h index 65a70019..0f3373a1 100644 --- a/libsolidity/ast/Types.h +++ b/libsolidity/ast/Types.h @@ -174,7 +174,7 @@ public: /// Will not contain any character which would be invalid as an identifier. std::string identifier() const; - /// More complex identifier strings use "parentheses", where $_ is interpreted as as + /// More complex identifier strings use "parentheses", where $_ is interpreted as /// "opening parenthesis", _$ as "closing parenthesis", _$_ as "comma" and any $ that /// appears as part of a user-supplied identifier is escaped as _$$$_. /// @returns an escaped identifier (will not contain any parenthesis or commas) |