< prev index next >

test/langtools/tools/javac/processing/model/TestSourceVersion.java

Print this page

        

@@ -94,11 +94,13 @@
          * keywords: open, module, requires, transitive, exports,
          * opens, to, uses, provides, and with"
          */
         Set<String> restrictedKeywords =
             Set.of("open", "module", "requires", "transitive", "exports",
-                   "opens", "to", "uses", "provides", "with");
+                   "opens", "to", "uses", "provides", "with",
+                   // Assume "record" and "sealed" will be restricted keywords.
+                   "record", "sealed");
 
         for(String key : restrictedKeywords) {
             for(SourceVersion version : SourceVersion.values()) {
                 check(false, isKeyword(key, version), "keyword", version);
                 check(true,  isName(key, version),    "name",    version);
< prev index next >