-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:capabilitiesIssues tied with scala.caps.CapabilitiesIssues tied with scala.caps.Capabilitiesitype:bug
Description
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.
Metadata
Metadata
Assignees
Labels
area:capabilitiesIssues tied with scala.caps.CapabilitiesIssues tied with scala.caps.Capabilitiesitype:bug