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 d7f876d commit c1e1808Copy full SHA for c1e1808
tests/pos/i11995.scala
@@ -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