Compiler version
3.8 nightly
Minimized example
class C
trait A[T]
trait B[CC^] extends A[C^{CC}] // error: CC not found
trait D[CC^]:
val x: Object^{CC} = ???
Output
-- [E006] Not Found Error: cap-inheritance.scala:6:26 --------------------------
6 |trait B[CC^] extends A[C^{CC}] // error: CC not found
| ^^
| Not found: capability CC - did you mean CT?
|
| longer explanation available when compiling with `-explain`
1 error found
Expectation
Should compile. Note that trait D does compile. So it seems the term surrogate for CC in B is created, but is created too late to be visible in the parent clause.
Compiler version
3.8 nightly
Minimized example
Output
Expectation
Should compile. Note that trait D does compile. So it seems the term surrogate for CC in B is created, but is created too late to be visible in the parent clause.