changeset 58564:9d16f72682ae records

records: fix incorrect warning on preview type imports; from Jan
author chegar
date Fri, 25 Oct 2019 19:12:04 +0100
parents aad42e5ed1fb
children ea2c7391952b
files src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Fri Oct 25 17:51:41 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Fri Oct 25 19:12:04 2019 +0100
@@ -436,7 +436,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.