-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Port Capture-checked Scala 2 collections #23769
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
Conversation
odersky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my question about LazyKetSet. This should still be addressed but it can be a separate PR.
library/src/scala/collection/immutable/StrictOptimizedSeqOps.scala
Outdated
Show resolved
Hide resolved
hamzaremmal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good, Martin's upcoming PR should solve all the issues with the bound checker for caps.Pure. There is one added bounded that will not be covered by that check and needs to be (dropped ?) solved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All OK from my side. Nice that we could get rid of the StrictSeqOps traits and related stuff.
|
PR for pure checking: #23784 |
|
I'm going to bed now. If the tests are green we can merge. |
This was introduced in scala#23769 but it makes the following test fail: https://github.com/scala/scala3/blob/48bc891bd317a62956dc86297feb6e86a73083f6/tests/run/t4954.scala#L8
This was introduced in scala#23769 but it makes the following test fail: https://github.com/scala/scala3/blob/48bc891bd317a62956dc86297feb6e86a73083f6/tests/run/t4954.scala#L8
This was introduced in scala#23769 but it makes the following test fail: https://github.com/scala/scala3/blob/48bc891bd317a62956dc86297feb6e86a73083f6/tests/run/t4954.scala#L8
This was introduced in scala#23769 but it makes the following test fail: https://github.com/scala/scala3/blob/48bc891bd317a62956dc86297feb6e86a73083f6/tests/run/t4954.scala#L8
This was introduced in scala#23769 but it makes the following test fail: https://github.com/scala/scala3/blob/48bc891bd317a62956dc86297feb6e86a73083f6/tests/run/t4954.scala#L8
Fixed in scala#23769. Closes scala#23225.
Fixed in scala#23769. Closes scala#23225.
Changes:
collection.immutable.LazyListIterable[A], implements Iterable and IterableOps.LazyListandStreamare not capture-checked. Note added toLazyList.New traitno longer neededcollection.StrictSeqOps[A, CC[_] <: Pure, C], which extends SeqOps (which can now be impure) and requires the implementation to be pure.Seqand other data structures extend this.Suspicious changes:
MapOps.keySetchanges implementation to be always strict, unless it is one of the library's known strict collectionsNot capture-checked (yet?)
collection.convert.impla.k.a Steppers, due to some purity problems (maybe because we don't compile steppers and rely on Scala 2, for specialization?).