-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
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
ImmutableSetFactory.empty results in StackOverflowError #6457
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6457?orig=1 |
@JamesIry said: def newBuilder[A]: Builder[A, CC[A]] = new SetBuilder[A, CC[A]](empty[A]) GenericCompanion says def empty[A]: CC[A] = newBuilder[A].result So, um, boom. |
@JamesIry said: scala> object Factory extends scala.collection.generic.ImmutableMapFactory[scala.collection.immutable.HashMap] {}
<console>:7: error: object creation impossible, since method empty in class MapFactory of type [A, B]=> scala.collection.immutable.HashMap[A,B] is not defined
object Factory extends scala.collection.generic.ImmutableMapFactory[scala.collection.immutable.HashMap] {}
^ The reason is that ImmutableSetFactory mixes in GenericCompanion by way of generic.SetFactory by way of GenericSeqCompanion. ImmutableMapFactory does not mix in GenericCompanion. |
@JamesIry said: |
@adriaanm said: |
@adriaanm said: |
@retronym said: |
@adriaanm said: |
@Ichoran said: |
@Ichoran said: |
@Ichoran said: |
@adriaanm said: |
@adriaanm said: |
Not a regression, I saw the same thing in 2.9.1.
The text was updated successfully, but these errors were encountered: