bounded-quantification Questions
2
Solved
Why don't the following work?
scala> abstract class Foo[B<:Foo[B]]
defined class Foo
scala> class Goo[B<:Foo[B]](x: B)
defined class Goo
scala> trait Hoo[B<:Foo[B]] { self: B =...
Saki asked 27/7, 2011 at 7:11
1
Solved
How would I convert:
trait Foo[A <: Foo[A]]
to a type member?
I.e., I want something along the lines of the following:
trait Foo {
type A <: Foo {type A = ???}
}
but I am having diffi...
Cyano asked 9/1, 2013 at 18:45
4
I would like to move a type parameter to a type member.
This is the starting point which works:
trait Sys[S <: Sys[S]] {
type Tx
type Id <: Identifier[S#Tx]
}
trait Identifier[Tx] {
def...
Mannos asked 8/1, 2013 at 23:4
2
While cracking my head over another question, I came across different riddles which seem related. This is one of them:
trait Sys[S <: Sys[S]] {
type Peer <: Sys[Peer]
}
trait Fenced {
typ...
Coaly asked 25/9, 2012 at 18:44
1
© 2022 - 2024 — McMap. All rights reserved.