src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java
branchJDK-8226585-branch
changeset 58109 ee07de0d2c16
parent 53275 f5e601ad26a8
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Thu Sep 05 12:39:48 2019 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Thu Sep 12 17:47:24 2019 +0200
@@ -433,7 +433,7 @@
         Type attribImportType(JCTree tree, Env<AttrContext> env) {
             Assert.check(completionEnabled);
             Lint prevLint = chk.setLint(allowDeprecationOnImport ?
-                    lint : lint.suppress(LintCategory.DEPRECATION, LintCategory.REMOVAL));
+                    lint : lint.suppress(LintCategory.DEPRECATION, LintCategory.REMOVAL, LintCategory.PREVIEW));
             try {
                 // To prevent deep recursion, suppress completion of some
                 // types.
@@ -1168,6 +1168,8 @@
                                 sym.flags_field |= DEPRECATED_REMOVAL;
                             }
                         });
+            } else if (a.annotationType.type == syms.previewFeatureType) {
+                sym.flags_field |= Flags.PREVIEW_API;
             }
         }
     }