diff options
author | LianaHus <liana@ethdev.com> | 2015-09-30 00:22:02 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-10-02 18:38:48 +0800 |
commit | fe2b9a3b3c73b77069a0d6d36578f60e1f8d4203 (patch) | |
tree | cd45a044bd7c408df1ca954fb0d77530f1a8a81f /libsolidity/TypeChecker.h | |
parent | 6712437e6b65871787c9860168515b38a7751afc (diff) | |
download | dexon-solidity-fe2b9a3b3c73b77069a0d6d36578f60e1f8d4203.tar dexon-solidity-fe2b9a3b3c73b77069a0d6d36578f60e1f8d4203.tar.gz dexon-solidity-fe2b9a3b3c73b77069a0d6d36578f60e1f8d4203.tar.bz2 dexon-solidity-fe2b9a3b3c73b77069a0d6d36578f60e1f8d4203.tar.lz dexon-solidity-fe2b9a3b3c73b77069a0d6d36578f60e1f8d4203.tar.xz dexon-solidity-fe2b9a3b3c73b77069a0d6d36578f60e1f8d4203.tar.zst dexon-solidity-fe2b9a3b3c73b77069a0d6d36578f60e1f8d4203.zip |
added warning for noninitialized references in storage.
Diffstat (limited to 'libsolidity/TypeChecker.h')
-rw-r--r-- | libsolidity/TypeChecker.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libsolidity/TypeChecker.h b/libsolidity/TypeChecker.h index cc539e22..150f0a56 100644 --- a/libsolidity/TypeChecker.h +++ b/libsolidity/TypeChecker.h @@ -43,10 +43,10 @@ class TypeChecker: private ASTConstVisitor { public: /// Performs type checking on the given contract and all of its sub-nodes. - /// @returns true iff all checks passed. + /// @returns true iff all checks passed. Note even if all checks passed, errors() can still contain warnings bool checkTypeRequirements(ContractDefinition const& _contract); - /// @returns the list of errors found during type checking. + /// @returns the list of errors and warnings found during type checking. std::vector<std::shared_ptr<Error const>> const& errors() const { return m_errors; } /// @returns the type of an expression and asserts that it is present. @@ -57,6 +57,9 @@ public: /// Adds a new error to the list of errors. void typeError(ASTNode const& _node, std::string const& _description); + /// Adds a new warning to the list of errors. + void typeWarning(ASTNode const& _node, std::string const& _description); + /// Adds a new error to the list of errors and throws to abort type checking. void fatalTypeError(ASTNode const& _node, std::string const& _description); |