8000 case class with higher kinded type parameter generates buggy canEqual, triggers kind error since v2.11.0-M1-246-g46e8ece · Issue #9331 · scala/bug · GitHub
[go: up one dir, main page]

Skip to content
case class with higher kinded type parameter generates buggy canEqual, triggers kind error since v2.11.0-M1-246-g46e8ece #9331
@scabug

Description

@scabug
% scalac-hash 46e8eceecc5b5f6b49075550e54f035126fc256a sandbox/test.scala
sandbox/test.scala:9: error: kinds of the type arguments (Proxy[PP]) do not conform to the expected kinds of the type parameters (type P) in class Stuff.
Proxy[PP]'s type parameters do not match type P's expected parameters:
trait Proxy has one type parameter, but type P has one
case class Stuff[+P[PP <: Proxiable] <: Proxy[PP]](content: P[Data])
           ^
one error found
% ~/code/scala scalac-hash 46e8eceecc5b5f6b49075550e54f035126fc256a~1 sandbox/test.scala
% ~/code/scala cat sandbox/test.scala
import scala.language.higherKinds
trait Proxiable {
  def source: String
}
trait Proxy[+T <: Proxiable] {
  def source: String
}
case class Data(source: String) extends Proxiable
case class Stuff[+P[PP <: Proxiable] <: Proxy[PP]](content: P[Data])

Reported: https://groups.google.com/forum/#!topic/scala-user/QiQ0AvVwYm8

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0