langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
changeset 44184 606c14ee20ed
parent 44060 f420de7e26fa
child 44194 c868c8c24e18
equal deleted inserted replaced
44183:17244500b154 44184:606c14ee20ed
  3056             incompatibleReturnType = null;
  3056             incompatibleReturnType = null;
  3057         }
  3057         }
  3058 
  3058 
  3059         if (!returnType.hasTag(VOID) && !resType.hasTag(VOID)) {
  3059         if (!returnType.hasTag(VOID) && !resType.hasTag(VOID)) {
  3060             if (resType.isErroneous() ||
  3060             if (resType.isErroneous() ||
  3061                     new FunctionalReturnContext(checkContext).compatible(resType, returnType, types.noWarnings)) {
  3061                     new FunctionalReturnContext(checkContext).compatible(resType, returnType,
       
  3062                             checkContext.checkWarner(tree, resType, returnType))) {
  3062                 incompatibleReturnType = null;
  3063                 incompatibleReturnType = null;
  3063             }
  3064             }
  3064         }
  3065         }
  3065 
  3066 
  3066         if (incompatibleReturnType != null) {
  3067         if (incompatibleReturnType != null) {