perf(library/elaborator): avoid exception
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
4de5f06a97
commit
f8e87436a7
1 changed files with 3 additions and 1 deletions
|
@ -224,7 +224,9 @@ class elaborator::imp {
|
|||
|
||||
/** \brief Return true iff \c a is a proposition */
|
||||
bool is_proposition(expr const & a, context const & ctx) {
|
||||
if (is_metavar(a)) {
|
||||
if ((is_metavar(a)) ||
|
||||
(is_app(a) && is_metavar(arg(a, 0))) ||
|
||||
(is_abstraction(a) && (is_metavar(abst_domain(a)) || is_metavar(abst_body(a))))) {
|
||||
// Avoid exception at m_type_inferer.
|
||||
// Throw is expensive in C++.
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue