Skip to content

Commit 85e2d1a

Browse files
Backport "Add sources of synthetic classes to sources jar" to LTS (#21992)
Backports #20904 to the LTS branch. PR submitted by the release tooling. [skip ci]
2 parents 64d7afc + 09c075e commit 85e2d1a

File tree

5 files changed

+33
-1
lines changed

5 files changed

+33
-1
lines changed

Diff for: library-aux/src/scala/AnyKind.scala

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package scala
2+
3+
/** The super-type of all types.
4+
*
5+
* See [[https://docs.scala-lang.org/scala3/reference/other-new-features/kind-polymorphism.html]].
6+
*/
7+
final abstract class AnyKind

Diff for: library-aux/src/scala/Matchable.scala

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package scala
2+
3+
/** The base trait of types that can be safely pattern matched against.
4+
*
5+
* See [[https://docs.scala-lang.org/scala3/reference/other-new-features/matchable.html]].
6+
*/
7+
trait Matchable

Diff for: library-aux/src/scala/andType.scala

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package scala
2+
3+
/** The intersection of two types.
4+
*
5+
* See [[https://docs.scala-lang.org/scala3/reference/new-types/intersection-types.html]].
6+
*/
7+
type &[A, B]

Diff for: library-aux/src/scala/orType.scala

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package scala
2+
3+
/** The union of two types.
4+
*
5+
* See [[https://docs.scala-lang.org/scala3/reference/new-types/union-types.html]].
6+
*/
7+
type |[A, B]

Diff for: project/Build.scala

+5-1
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,11 @@ object Build {
879879
"-sourcepath", (Compile / sourceDirectories).value.map(_.getAbsolutePath).distinct.mkString(File.pathSeparator),
880880
"-Yexplicit-nulls",
881881
),
882-
(Compile / doc / scalacOptions) ++= ScaladocConfigs.DefaultGenerationSettings.value.settings
882+
(Compile / doc / scalacOptions) ++= ScaladocConfigs.DefaultGenerationSettings.value.settings,
883+
(Compile / packageSrc / mappings) ++= {
884+
val auxBase = (ThisBuild / baseDirectory).value / "library-aux/src"
885+
auxBase ** "*.scala" pair io.Path.relativeTo(auxBase)
886+
},
883887
)
884888

885889
lazy val `scala3-library` = project.in(file("library")).asDottyLibrary(NonBootstrapped)

0 commit comments

Comments
 (0)