We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89ab499 commit 678ecadCopy full SHA for 678ecad
tests/neg/i4781.scala
@@ -0,0 +1,9 @@
1
+class A
2
+class B extends A
3
+
4
+class Map[T] { def foo(x: T): A = new A }
5
6
+class AnyRefMap[T <: AnyRef] extends Map[T] {
7
+ // This is an overload in Scala 2 but an override in Dotty
8
+ def foo(y: T with AnyRef): B = new B // error: missing override modifier
9
+}
0 commit comments