## Compiler version https://github.com/scala/scala3/commit/dfacd3f4dfe754919126df092d657d9886d7b8b6 ## Minimized code Scala File: ```scala class Box[T] trait Foo: def foo: Box[this.type] = ??? abstract class Bar extends Foo: override def foo: Box[this.type] = ??? ``` Java file: ```java class JBar extends Bar { } ``` ## Output Javac will complain. ```scala test.java:1: error: foo() in Bar cannot implement foo() in Foo class JBar extends Bar { } ^ return type Box<Bar> is not compatible with Box<Foo> 1 error ``` ## Expectation To work. Although, this is up to debate. ## Note Changing the `trait` to an `abstract class` works. I believe this is actually a bug in the JVM given that this is against the specification.