--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java Mon Dec 04 10:13:58 2017 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java Mon Dec 04 17:54:49 2017 +0000
@@ -37,6 +37,7 @@
import com.sun.tools.javac.code.Scope.NamedImportScope;
import com.sun.tools.javac.code.Scope.StarImportScope;
import com.sun.tools.javac.code.Scope.WriteableScope;
+import com.sun.tools.javac.code.Source.Feature;
import com.sun.tools.javac.comp.Annotate.AnnotationTypeMetadata;
import com.sun.tools.javac.tree.*;
import com.sun.tools.javac.util.*;
@@ -137,8 +138,8 @@
typeEnvs = TypeEnvs.instance(context);
dependencies = Dependencies.instance(context);
Source source = Source.instance(context);
- allowTypeAnnos = source.allowTypeAnnotations();
- allowDeprecationOnImport = source.allowDeprecationOnImport();
+ allowTypeAnnos = Feature.TYPE_ANNOTATIONS.allowedInSource(source);
+ allowDeprecationOnImport = Feature.DEPRECATION_ON_IMPORT.allowedInSource(source);
}
/** Switch: support type annotations.