389 JCDiagnostic d = ex.getDiagnostic(); |
389 JCDiagnostic d = ex.getDiagnostic(); |
390 return typeError(pos, |
390 return typeError(pos, |
391 diags.fragment("incompatible.types" + (d!=null ? ".1" : ""), d), |
391 diags.fragment("incompatible.types" + (d!=null ? ".1" : ""), d), |
392 t, pt); |
392 t, pt); |
393 } |
393 } |
|
394 } catch (Infer.InvalidInstanceException ex) { |
|
395 JCDiagnostic d = ex.getDiagnostic(); |
|
396 log.error(pos, "invalid.inferred.types", t.tvars, d); |
|
397 return types.createErrorType(pt); |
394 } |
398 } |
395 } |
399 } |
396 } |
400 } |
397 |
401 |
398 /** Check that a given type can be cast to a given target type. |
402 /** Check that a given type can be cast to a given target type. |