[jdk16] RFR: 8258972: unexpected compilation error with generic sealed interface [v2]

Vicente Romero vromero at openjdk.java.net
Tue Jan 5 20:28:12 UTC 2021


> Hi,
> 
> Please review this fix to the implementation of section `5.1.6.1 Allowed Narrowing Reference Conversion` of the Sealed Classes spec [1](http://cr.openjdk.java.net/~gbierman/jep397/jep397-20201204/specs/sealed-classes-jls.html#jls-5.1.6.1). IMO the compiler was not implementing the spec to the letter in particular the inheritance relation between a sealed class and a subclass should be tested ignoring type arguments which is what this patch is doing. Comments?
> 
> Thanks,
> Vicente

Vicente Romero has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:

 - Merge branch 'master' into JDK-8258972
 - 8258972: unexpected compilation error with generic sealed interface

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

Changes:
  - all: https://git.openjdk.java.net/jdk16/pull/72/files
  - new: https://git.openjdk.java.net/jdk16/pull/72/files/91d25308..36017f21

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk16&pr=72&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk16&pr=72&range=00-01

  Stats: 35 lines in 2 files changed: 31 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk16/pull/72.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk16 pull/72/head:pull/72

PR: https://git.openjdk.java.net/jdk16/pull/72


More information about the compiler-dev mailing list