Skip to content

Are Java parents supposed to come with their own arguments or delegate that to their lawyers? #11111

@Blaisorblade

Description

@Blaisorblade

One of these two things is wrong:

scala> class i0 extends java.util.ArrayList
defined class i0

scala> class i0 extends java.util.List
<console>:11: error: trait List takes type parameters
       class i0 extends java.util.List
                                  ^

I vote for "they're both illegal and Dotty will forbid both, absent some extremely strong compatibility requirement".

The first happens to be tested by test/files/run/t3613.scala, which still lives in Dotty, but maybe the code was legal back then, either because of different semantics with raw types, or because AbstractListModel had no type argument in Java 6 and only got one in Java 7. (Thanks @hrhino for pointing this out and helping diagnose this on Gitter).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions