Skip to content

Commit eac43f1

Browse files
authored
Make sure that the Scala 2 library CC compiles on the stable branch (#19973)
2 parents b0ba045 + bd9ca7d commit eac43f1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

project/Build.scala

+1
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,7 @@ object Build {
10661066
Compile / doc / scalacOptions += "-Ydocument-synthetic-types",
10671067
scalacOptions += "-Ycompile-scala2-library",
10681068
scalacOptions += "-Yscala2Unpickler:never",
1069+
scalacOptions += "-Yno-experimental",
10691070
scalacOptions -= "-Xfatal-warnings",
10701071
Compile / compile / logLevel := Level.Error,
10711072
ivyConfigurations += SourceDeps.hide,

scala2-library-cc/src/scala/collection/generic/IsSeq.scala

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ object IsSeq {
5858
* The helper method [[seqViewIsSeq_]] is added to make the binary compatible.
5959
*/
6060
@annotation.targetName("seqViewIsSeq")
61-
@annotation.publicInBinary
62-
private[IsSeq] def seqViewIsSeq_[CC0[X] <: SeqView[X], A0]: IsSeq[CC0[A0]] { type A = A0; type C = View[A0] } = ???
61+
// @annotation.publicInBinary private[IsSeq] // FIXME: enable when publicInBinary becomes stable
62+
def seqViewIsSeq_[CC0[X] <: SeqView[X], A0]: IsSeq[CC0[A0]] { type A = A0; type C = View[A0] } = ???
6363
implicit inline def seqViewIsSeq[CC0[X] <: SeqView[X], A0]: IsIterable[CC0[A0]] { type A = A0; type C = View[A0] } = seqViewIsSeq_[CC0, A0].asInstanceOf
6464

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

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

0 commit comments

Comments
 (0)