26 package com.sun.tools.javac.comp; |
26 package com.sun.tools.javac.comp; |
27 |
27 |
28 import com.sun.tools.javac.api.Formattable.LocalizedString; |
28 import com.sun.tools.javac.api.Formattable.LocalizedString; |
29 import com.sun.tools.javac.code.*; |
29 import com.sun.tools.javac.code.*; |
30 import com.sun.tools.javac.code.Scope.WriteableScope; |
30 import com.sun.tools.javac.code.Scope.WriteableScope; |
|
31 import com.sun.tools.javac.code.Source.Feature; |
31 import com.sun.tools.javac.code.Symbol.*; |
32 import com.sun.tools.javac.code.Symbol.*; |
32 import com.sun.tools.javac.code.Type.*; |
33 import com.sun.tools.javac.code.Type.*; |
33 import com.sun.tools.javac.comp.Attr.ResultInfo; |
34 import com.sun.tools.javac.comp.Attr.ResultInfo; |
34 import com.sun.tools.javac.comp.Check.CheckContext; |
35 import com.sun.tools.javac.comp.Check.CheckContext; |
35 import com.sun.tools.javac.comp.DeferredAttr.AttrMode; |
36 import com.sun.tools.javac.comp.DeferredAttr.AttrMode; |
135 compactMethodDiags = options.isSet(Option.XDIAGS, "compact") || |
136 compactMethodDiags = options.isSet(Option.XDIAGS, "compact") || |
136 options.isUnset(Option.XDIAGS) && options.isUnset("rawDiagnostics"); |
137 options.isUnset(Option.XDIAGS) && options.isUnset("rawDiagnostics"); |
137 verboseResolutionMode = VerboseResolutionMode.getVerboseResolutionMode(options); |
138 verboseResolutionMode = VerboseResolutionMode.getVerboseResolutionMode(options); |
138 Target target = Target.instance(context); |
139 Target target = Target.instance(context); |
139 allowMethodHandles = target.hasMethodHandles(); |
140 allowMethodHandles = target.hasMethodHandles(); |
140 allowFunctionalInterfaceMostSpecific = source.allowFunctionalInterfaceMostSpecific(); |
141 allowFunctionalInterfaceMostSpecific = Feature.FUNCTIONAL_INTERFACE_MOST_SPECIFIC.allowedInSource(source); |
141 allowLocalVariableTypeInference = source.allowLocalVariableTypeInference(); |
142 allowLocalVariableTypeInference = Feature.LOCAL_VARIABLE_TYPE_INFERENCE.allowedInSource(source); |
142 checkVarargsAccessAfterResolution = |
143 checkVarargsAccessAfterResolution = |
143 source.allowPostApplicabilityVarargsAccessCheck(); |
144 Feature.POST_APPLICABILITY_VARARGS_ACCESS_CHECK.allowedInSource(source); |
144 polymorphicSignatureScope = WriteableScope.create(syms.noSymbol); |
145 polymorphicSignatureScope = WriteableScope.create(syms.noSymbol); |
145 |
146 |
146 inapplicableMethodException = new InapplicableMethodException(diags); |
147 inapplicableMethodException = new InapplicableMethodException(diags); |
147 |
148 |
148 allowModules = source.allowModules(); |
149 allowModules = Feature.MODULES.allowedInSource(source); |
149 } |
150 } |
150 |
151 |
151 /** error symbols, which are returned when resolution fails |
152 /** error symbols, which are returned when resolution fails |
152 */ |
153 */ |
153 private final SymbolNotFoundError varNotFound; |
154 private final SymbolNotFoundError varNotFound; |