Skip to content

Commit c1e1808

Browse files
committed
Add test
1 parent d7f876d commit c1e1808

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/pos/i11995.scala

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
trait MyBase[A]{
2+
def foo: String
3+
}
4+
5+
case class BothThing[L, R]() extends MyBase[L & R]:
6+
def foo: String = "blather"
7+
8+
trait Has[A]
9+
10+
trait Console
11+
trait Clock
12+
13+
type ConsoleWithClock = Has[Console] with Has[Clock]
14+
15+
class Spec[R <: Has[_]]
16+
17+
object MySpec1 extends Spec[Has[Console] with Has[Clock]] // does not compile
18+
object MySpec2 extends Spec[ConsoleWithClock] // okay

0 commit comments

Comments
 (0)