if (ff.isPred) newBody = newBody.resolve_as_formula(warns); else newBody = newBody.resolve_as_set(warns);
errors = errors.make(newBody.errors);
if (!newBody.errors.isEmpty()) continue;
try { ff.setBody(newBody); } catch(Err er) {errors = errors.make(er); continue;}
if (warns!=null && ff.returnDecl.type().hasTuple() && newBody.type().hasTuple() && !newBody.type().intersects(ff.returnDecl.type()))
warns.add(new ErrorWarning(newBody.span(),
"Function return value is disjoint from its return type.\n"
+"Function body has type "+newBody.type() + "\n" + "but the return type is "+ff.returnDecl.type()));
//else if (warns!=null && Version.experimental && !newBody.type.isSubtypeOf(ff.returnDecl.type))
// warns.add(new ErrorWarning(newBody.span(),
// "Function may return a tuple not in its declared return type.\n"