Capture conversion issue in Java, WRT reconciliation of JLS and actual JDK behaviour

前端 未结 1 1892
终归单人心
终归单人心 2021-01-01 18:11

Given the following two class definitions:

class C1> {}

class C2 extends C1> {}

Con

1条回答
  •  说谎
    说谎 (楼主)
    2021-01-01 18:25

    This question is answered best by Maurizio's response on compiler-dev.

    (TL;DR javac is indeed out of alignment with the spec here, and the optimal solution probably lies somewhere between the two approaches)

    An associated bug can be found here.

    Many thanks to all who contributed to this answer.

    0 讨论(0)
提交回复
热议问题