Skip to content

Make sure that the Scala 2 library CC compiles on the stable branch #19973

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,7 @@ object Build {
Compile / doc / scalacOptions += "-Ydocument-synthetic-types",
scalacOptions += "-Ycompile-scala2-library",
scalacOptions += "-Yscala2Unpickler:never",
scalacOptions += "-Yno-experimental",
scalacOptions -= "-Xfatal-warnings",
Compile / compile / logLevel := Level.Error,
ivyConfigurations += SourceDeps.hide,
Expand Down
8 changes: 4 additions & 4 deletions scala2-library-cc/src/scala/collection/generic/IsSeq.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ object IsSeq {
* The helper method [[seqViewIsSeq_]] is added to make the binary compatible.
*/
@annotation.targetName("seqViewIsSeq")
@annotation.publicInBinary
private[IsSeq] def seqViewIsSeq_[CC0[X] <: SeqView[X], A0]: IsSeq[CC0[A0]] { type A = A0; type C = View[A0] } = ???
// @annotation.publicInBinary private[IsSeq] // FIXME: enable when publicInBinary becomes stable
def seqViewIsSeq_[CC0[X] <: SeqView[X], A0]: IsSeq[CC0[A0]] { type A = A0; type C = View[A0] } = ???
implicit inline def seqViewIsSeq[CC0[X] <: SeqView[X], A0]: IsIterable[CC0[A0]] { type A = A0; type C = View[A0] } = seqViewIsSeq_[CC0, A0].asInstanceOf

/** !!! Under cc, views are not Seqs and can't use SeqOps.
* Therefore, [[stringViewIsSeq]] now returns an [[IsIterable]].
* The helper method [[stringViewIsSeq__]] is added to make the binary compatible.
*/
@annotation.targetName("stringViewIsSeq")
@annotation.publicInBinary
private[IsSeq] val stringViewIsSeq_ : IsSeq[StringView] { type A = Char; type C = View[Char] } = ???
// @annotation.publicInBinary private[IsSeq] // FIXME: enable when publicInBinary becomes stable
val stringViewIsSeq_ : IsSeq[StringView] { type A = Char; type C = View[Char] } = ???
inline implicit def stringViewIsSeq: IsIterable[StringView] { type A = Char; type C = View[Char] } = stringViewIsSeq_.asInstanceOf

implicit val stringIsSeq: IsSeq[String] { type A = Char; type C = String } =
Expand Down