equal
deleted
inserted
replaced
2664 } |
2664 } |
2665 |
2665 |
2666 @Override |
2666 @Override |
2667 public boolean compatible(Type found, Type req, Warner warn) { |
2667 public boolean compatible(Type found, Type req, Warner warn) { |
2668 //return type must be compatible in both current context and assignment context |
2668 //return type must be compatible in both current context and assignment context |
2669 return chk.basicHandler.compatible(found, inferenceContext().asUndetVar(req), warn); |
2669 return chk.basicHandler.compatible(inferenceContext().asUndetVar(found), inferenceContext().asUndetVar(req), warn); |
2670 } |
2670 } |
2671 |
2671 |
2672 @Override |
2672 @Override |
2673 public void report(DiagnosticPosition pos, JCDiagnostic details) { |
2673 public void report(DiagnosticPosition pos, JCDiagnostic details) { |
2674 enclosingContext.report(pos, diags.fragment("incompatible.ret.type.in.lambda", details)); |
2674 enclosingContext.report(pos, diags.fragment("incompatible.ret.type.in.lambda", details)); |