Skip to content

Commit

Permalink
Evaluate partiality of arguments even if call was already in CSE table.
Browse files Browse the repository at this point in the history
Fixes #374.
  • Loading branch information
guidotack committed Mar 6, 2020
1 parent 44bdb9b commit 2246a5d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/flatten/flatten_call.cpp
Expand Up @@ -872,7 +872,12 @@ namespace MiniZinc {
}
EnvI::CSEMap::iterator cit = env.cse_map_find(cr());
if (cit != env.cse_map_end()) {
ret.b = bind(env,Ctx(),b,env.ignorePartial ? constants().lit_true : cit->second.b());
if (env.ignorePartial) {
ret.b = bind(env,Ctx(),b,constants().lit_true);
} else {
args_ee.push_back(EE(nullptr,cit->second.b()));
ret.b = conj(env,b,Ctx(),args_ee);
}
ret.r = bind(env,ctx,r,cit->second.r());
} else {
for (unsigned int i=0; i<decl->params().size(); i++) {
Expand Down

0 comments on commit 2246a5d

Please sign in to comment.