Allowing “exists” derived predicates to hold the precondition directly.

This commit is contained in:
Patrick Lühne 2017-06-27 12:34:15 +02:00
parent ea50cffac9
commit 5c93840f85
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -104,7 +104,11 @@ normalizedAST::Literal normalizeNested(ast::ExistsPointer<ast::Precondition> &ex
auto derivedPredicate = addDerivedPredicate(parameters, derivedPredicates);
derivedPredicate->declaration->existentialParameters = std::move(exists->parameters);
derivedPredicate->declaration->precondition = exists->argument.match([&](auto &x){return normalizeNested(x, derivedPredicates);});
derivedPredicate->declaration->precondition = exists->argument.match(
[&](auto &x) -> normalizedAST::DerivedPredicatePrecondition
{
return normalizeTopLevel(x, derivedPredicates);
});
// TODO: investigate, could be a compiler bug
return std::move(derivedPredicate);