[lworld] RFR: 8293183: [lworld] add missing tests for functional interfaces

Vicente Romero vromero at openjdk.org
Wed Aug 31 19:42:08 UTC 2022


this PR is adding some additional regression tests for functional interfaces, covering this assertion on section: 9.8 Functional Interfaces of [1]:

 * A functional interface is an interface that is not declared with one of the modifiers sealed, identity, or value...

but this should apply too to functional interfaces which are not explicitly declared with the `identity` modifier. So this code should not be accepted:

    identity interface I {
        void m();
    }

    @FunctionalInterface
    interface J extends I {}

[1] http://cr.openjdk.java.net/~dlsmith/jep8277163/jep8277163-20220519/specs/value-objects-jls.html#jls-9.8

-------------

Commit messages:
 - 8293183: [lworld] add missing tests for functional interfaces

Changes: https://git.openjdk.org/valhalla/pull/735/files
 Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=735&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8293183
  Stats: 38 lines in 1 file changed: 34 ins; 2 del; 2 mod
  Patch: https://git.openjdk.org/valhalla/pull/735.diff
  Fetch: git fetch https://git.openjdk.org/valhalla pull/735/head:pull/735

PR: https://git.openjdk.org/valhalla/pull/735



More information about the valhalla-dev mailing list