private void solve(GraphStrategy ss, Warner warn) { solve(ss, new HashMap<Type, Set<Type>>(), warn); }
private void solve(GraphStrategy ss, Warner warn) { solve(ss, new HashMap<Type, Set<Type>>(), warn); }
inferenceContext.solve(warn); } else { inferenceContext.solveLegacy(true, warn, LegacyInferenceSteps.EQ_LOWER.steps); //minimizeInst
funcInterfaceContext.solve(funcInterfaceContext.boundedVars(), types.noWarnings); } catch (InferenceException ex) { checkContext.report(pos, diags.fragment("no.suitable.functional.intf.inst", funcInterface));
inferenceContext.solve(warn); } else { inferenceContext.solveLegacy(true, warn, LegacyInferenceSteps.EQ_LOWER.steps); //minimizeInst
funcInterfaceContext.solve(funcInterfaceContext.boundedVars(), types.noWarnings); } catch (InferenceException ex) { checkContext.report(pos, diags.fragment("no.suitable.functional.intf.inst", funcInterface));
private Type generateReferenceToTargetConstraint(JCTree tree, UndetVar from, Type to, Attr.ResultInfo resultInfo, InferenceContext inferenceContext) { inferenceContext.solve(List.of(from.qtype), new Warner()); inferenceContext.notifyChange(); Type capturedType = resultInfo.checkContext.inferenceContext() .cachedCapture(tree, from.inst, false); if (types.isConvertible(capturedType, resultInfo.checkContext.inferenceContext().asUndetVar(to))) { //effectively skip additional return-type constraint generation (compatibility) return syms.objectType; } return to; }
/** * Solve at least one variable in given list. */ public void solveAny(List<Type> varsToSolve, Map<Type, Set<Type>> optDeps, Warner warn) { solve(new BestLeafSolver(varsToSolve.intersect(restvars())) { public boolean done() { return instvars().intersect(varsToSolve).nonEmpty(); } }, optDeps, warn); }
/** * Solve all variables in the given list. */ public void solve(final List<Type> vars, Warner warn) { solve(new BestLeafSolver(vars) { public boolean done() { return !free(asInstTypes(vars)); } }, warn); }
/** * Solve all variables in this context. */ public void solve(Warner warn) { solve(new LeafSolver() { public boolean done() { return restvars().isEmpty(); } }, warn); }
/** * Solve at least one variable in given list. */ public void solveAny(List<Type> varsToSolve, Map<Type, Set<Type>> optDeps, Warner warn) { solve(new BestLeafSolver(varsToSolve.intersect(restvars())) { public boolean done() { return instvars().intersect(varsToSolve).nonEmpty(); } }, optDeps, warn); }
/** * Solve all variables in this context. */ public void solve(Warner warn) { solve(new LeafSolver() { public boolean done() { return restvars().isEmpty(); } }, warn); }
/** * Solve all variables in the given list. */ public void solve(final List<Type> vars, Warner warn) { solve(new BestLeafSolver(vars) { public boolean done() { return !free(asInstTypes(vars)); } }, warn); }