94 JCDiagnostic.Factory diags; |
94 JCDiagnostic.Factory diags; |
95 public final boolean boxingEnabled; |
95 public final boolean boxingEnabled; |
96 public final boolean varargsEnabled; |
96 public final boolean varargsEnabled; |
97 public final boolean allowMethodHandles; |
97 public final boolean allowMethodHandles; |
98 public final boolean allowFunctionalInterfaceMostSpecific; |
98 public final boolean allowFunctionalInterfaceMostSpecific; |
|
99 public final boolean checkVarargsAccessDuringResolution; |
99 private final boolean debugResolve; |
100 private final boolean debugResolve; |
100 private final boolean compactMethodDiags; |
101 private final boolean compactMethodDiags; |
101 final EnumSet<VerboseResolutionMode> verboseResolutionMode; |
102 final EnumSet<VerboseResolutionMode> verboseResolutionMode; |
102 |
103 |
103 Scope polymorphicSignatureScope; |
104 Scope polymorphicSignatureScope; |
135 options.isUnset(Option.XDIAGS) && options.isUnset("rawDiagnostics"); |
136 options.isUnset(Option.XDIAGS) && options.isUnset("rawDiagnostics"); |
136 verboseResolutionMode = VerboseResolutionMode.getVerboseResolutionMode(options); |
137 verboseResolutionMode = VerboseResolutionMode.getVerboseResolutionMode(options); |
137 Target target = Target.instance(context); |
138 Target target = Target.instance(context); |
138 allowMethodHandles = target.hasMethodHandles(); |
139 allowMethodHandles = target.hasMethodHandles(); |
139 allowFunctionalInterfaceMostSpecific = source.allowFunctionalInterfaceMostSpecific(); |
140 allowFunctionalInterfaceMostSpecific = source.allowFunctionalInterfaceMostSpecific(); |
|
141 checkVarargsAccessDuringResolution = |
|
142 source.allowPostApplicabilityVarargsAccessCheck(); |
140 polymorphicSignatureScope = new Scope(syms.noSymbol); |
143 polymorphicSignatureScope = new Scope(syms.noSymbol); |
141 |
144 |
142 inapplicableMethodException = new InapplicableMethodException(diags); |
145 inapplicableMethodException = new InapplicableMethodException(diags); |
143 } |
146 } |
144 |
147 |
832 List<Type> argtypes, |
835 List<Type> argtypes, |
833 List<Type> formals, |
836 List<Type> formals, |
834 Warner warn) { |
837 Warner warn) { |
835 super.argumentsAcceptable(env, deferredAttrContext, argtypes, formals, warn); |
838 super.argumentsAcceptable(env, deferredAttrContext, argtypes, formals, warn); |
836 //should we expand formals? |
839 //should we expand formals? |
837 if (deferredAttrContext.phase.isVarargsRequired()) { |
840 if ((!checkVarargsAccessDuringResolution || |
|
841 (checkVarargsAccessDuringResolution && |
|
842 deferredAttrContext.mode == AttrMode.CHECK)) && |
|
843 deferredAttrContext.phase.isVarargsRequired()) { |
838 //check varargs element type accessibility |
844 //check varargs element type accessibility |
839 varargsAccessible(env, types.elemtype(formals.last()), |
845 varargsAccessible(env, types.elemtype(formals.last()), |
840 deferredAttrContext.inferenceContext); |
846 deferredAttrContext.inferenceContext); |
841 } |
847 } |
842 } |
848 } |