From 9fc6eccc26eea6f5a70f2960df9d53d49392151e Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 27 Jul 2017 20:55:55 +0100 Subject: Add isFallback() helper --- libsolidity/ast/AST.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity/ast/AST.cpp') diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp index ebc8bd48..1d68231e 100644 --- a/libsolidity/ast/AST.cpp +++ b/libsolidity/ast/AST.cpp @@ -162,7 +162,7 @@ FunctionDefinition const* ContractDefinition::fallbackFunction() const { for (ContractDefinition const* contract: annotation().linearizedBaseContracts) for (FunctionDefinition const* f: contract->definedFunctions()) - if (f->name().empty()) + if (f->isFallback()) return f; return nullptr; } -- cgit