src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
changeset 48054 702043a4cdeb
parent 47942 06652ffab955
child 48459 a5f815d1060b
equal deleted inserted replaced
48053:6dcbdc9f99fc 48054:702043a4cdeb
    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;