We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9449ee4 + 193bac0 commit 2d23cbaCopy full SHA for 2d23cba
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -868,7 +868,7 @@ object Types {
868
matchLoosely && {
869
val this1 = widenNullary(this)
870
val that1 = widenNullary(that)
871
- ((this1 `ne` this) || (that1 `ne` that)) && this1.overrides(this1, matchLoosely = false)
+ ((this1 `ne` this) || (that1 `ne` that)) && this1.overrides(that1, matchLoosely = false)
872
}
873
)
874
tests/neg/i5453/J.java
@@ -0,0 +1,3 @@
1
+class J {
2
+ String foo() { return "hello"; }
3
+}
tests/neg/i5453/S.scala
+class S extends J {
+ override def foo(): Int = 42 // error: incompatible return type
0 commit comments