Skip to content

Commit 18e1a35

Browse files
committed
Fix #4820: add test
The code no longer type checks after #5027.
1 parent 1dc3279 commit 18e1a35

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

tests/neg/i4820.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class Foo[A]
2+
class Bar[A] extends Foo // error

tests/neg/i4820b.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
trait SetOps[A, +C <: SetOps[A, C]] {
2+
def concat(that: Iterable[A]): C = ???
3+
}
4+
5+
class Set1[A] extends SetOps // error: should be SetOps[A, Set1[A]]

tests/neg/i4820c.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
trait Foo[A]
2+
class Bar[A] extends Foo // error

0 commit comments

Comments
 (0)