8306854: javac with '-source 7' should honor default methods in implemented Java 8 interfaces

Archie Cobbs archie.cobbs at gmail.com
Wed Apr 26 14:50:25 UTC 2023


On Wed, Apr 26, 2023 at 9:41 AM Volker Simonis <volker.simonis at gmail.com>
wrote:

> On Wed, Apr 26, 2023 at 4:14 PM Brian Goetz <brian.goetz at oracle.com>
> wrote:
> > It's not OK to consider, use, or interpret a default method in B.class
> > (version >= Java 8) when compiling C.java with `-source 7`.
>
> I could fully accept your answer if 'javac -source 7' would plainly reject
> to process Java 8 class files.


An observation from a neutral observer...

I think there is a basic confusion here about what exactly the "-source"
flag is supposed to mean.

A basic question: what, if anything, does "-source" have to do with how
CLASS files are interpreted??

Brian seems to be implying that it only affects how SOURCE files are
interpreted.

Volker seems to be implying that it should also affect how CLASS files are
interpreted.

Maybe clarifying this question would help.

-Archie

-- 
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20230426/5a19f65a/attachment.htm>


More information about the compiler-dev mailing list