We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SetSpec's val set has a type of Set[E, S]; what I would like to see is something more like SES <: Set[E, S] — but this breaks compilation somehow.
SetSpec
val set
Set[E, S]
SES <: Set[E, S]
The offending code is:
object RedBlackSetSpec { val set = new RedBlackSet[Int] } class RedBlackSetSpec extends SetSpec(RedBlackSetSpec.set) with IntElements { val set = RedBlackSetSpec.set // ... }
the ideal code would be something along the lines of,
class RedBlackSetSpec extends SetSpec(new RedBlackSet[Int]) with IntElements { // ... }
The text was updated successfully, but these errors were encountered:
#6 explicit type parameters make code compile and run
a538650
Asked on StackOverflow: http://stackoverflow.com/questions/32279385/generic-inheritance-in-scala
Sorry, something went wrong.
No branches or pull requests
SetSpec
'sval set
has a type ofSet[E, S]
; what I would like to see is something more likeSES <: Set[E, S]
— but this breaks compilation somehow.The offending code is:
the ideal code would be something along the lines of,
The text was updated successfully, but these errors were encountered: