test jdk/jshell/CompletenessTest.java fails for records

XMLWordPrintable

    • Type: CSR
    • Resolution: Withdrawn
    • Priority: P3
    • 14
    • Component/s: tools
    • None
    • source
    • minimal
    • Java API

      Summary

      jdk.jshell.Snippet.SubKind contains constants for different types of jshell snippets, and differentiated between classes, enums, interfaces and annotations. It should also show records separately.

      Problem

      The jdk.jshell.Snippet.SubKind enum does not contain an enum constant for records.

      Solution

      A new constant, RECORD_SUBKIND, is added into jdk.jshell.Snippet.SubKind.

      Specification

      The exact proposed change is:

      <pre> @@ -234,10 +234,26 @@ * @jls 8.9 Enum Types */ ENUM_SUBKIND(Kind.TYPE_DECL), /** + * {@preview Associated with records, a preview feature of the Java language. + * + * This enum constant is associated with <i>records</i>, a preview + * feature of the Java language. Preview features + * may be removed in a future release, or upgraded to permanent + * features of the Java language.} + * + * A record declaration. + * A {@code SubKind} of {@link Kind#TYPE_DECL}. + * @jls 8.10 Record Types + * + */ + @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS) + RECORD_SUBKIND(Kind.TYPE_DECL), + + /** * An annotation interface declaration. A {@code SubKind} of * {@link Kind#TYPE_DECL}. * @jls 9.6 Annotation Types */ ANNOTATION_TYPE_SUBKIND(Kind.TYPE_DECL), </pre>

            Assignee:
            Jan Lahoda
            Reporter:
            Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: