mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
some fixes
This commit is contained in:
parent
742e5b259a
commit
8f7f22c5a6
@ -41,6 +41,7 @@ public:
|
||||
DocstringParsingError,
|
||||
ParserError,
|
||||
TypeError,
|
||||
|
||||
Warning
|
||||
};
|
||||
|
||||
@ -69,7 +70,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
Type type() { return m_type; }
|
||||
Type const type() { return m_type; } const
|
||||
std::string const& typeName() const { return m_typeName; }
|
||||
|
||||
private:
|
||||
|
@ -45,11 +45,14 @@ bool TypeChecker::checkTypeRequirements(const ContractDefinition& _contract)
|
||||
}
|
||||
bool success = true;
|
||||
for (auto const& it: m_errors)
|
||||
if (!dynamic_cast<Warning const*>(it.get()))
|
||||
{
|
||||
Error const& e = dynamic_cast<Error const&>(it.get());
|
||||
if (e.type() != Error::Type::Warning)
|
||||
{
|
||||
success = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
bool checkTypeRequirements(ContractDefinition const& _contract);
|
||||
|
||||
/// @returns the list of errors and warnings found during type checking.
|
||||
std::vector<std::shared_ptr<Error const>> const& errors() const { return m_errors; }
|
||||
ErrorList const& errors() const { return m_errors; }
|
||||
|
||||
/// @returns the type of an expression and asserts that it is present.
|
||||
TypePointer const& type(Expression const& _expression) const;
|
||||
@ -114,7 +114,7 @@ private:
|
||||
/// Runs type checks on @a _expression to infer its type and then checks that it is an LValue.
|
||||
void requireLValue(Expression const& _expression);
|
||||
|
||||
std::vector<std::shared_ptr<Error const>> m_errors;
|
||||
ErrorList m_errors;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user