8175235: type inference regression after JDK-8046685Reviewed-by: mcimadamoreContributed-by: vicente.romero@oracle.com, maurizio.cimadamore@oracle.com