The following definition...
object Category {
def fCat = new Category[Function1] {
def compose[A, B, C](f: (B) => C)(g: (A) => B) = { a: A => f(g(a)) }
}
}
... is valid if Category
is defined as:
trait Category[~>[_, _]] {
def compose[A, B, C](f: ~>[B, C])(g: ~>[A, B]): ~>[A, C]
}
... but not when infixing the type constructor:
def compose[A, B, C](f: B ~> C)(g: A ~> B): A ~> C
Here IntelliJ complains that member compose is not defined in fCat
.
Is this a limitation of the Presentation Compiler? IntelliJ's Scala plugin? Or am I overlooking something?
This is an IntelliJ bug; it has its own presentation compiler.
I've reported it here: http://youtrack.jetbrains.com/issue/SCL-4179
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.