Skip to content

Commit 97a711c

Browse files
Add sources of synthetic classes to sources jar (#20904)
Closes #20073
2 parents 12d50a2 + 32b5843 commit 97a711c

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
@@ -985,7 +985,11 @@ object Build {
985985
"-sourcepath", (Compile / sourceDirectories).value.map(_.getAbsolutePath).distinct.mkString(File.pathSeparator),
986986
"-Yexplicit-nulls",
987987
),
988-
(Compile / doc / scalacOptions) ++= ScaladocConfigs.DefaultGenerationSettings.value.settings
988+
(Compile / doc / scalacOptions) ++= ScaladocConfigs.DefaultGenerationSettings.value.settings,
989+
(Compile / packageSrc / mappings) ++= {
990+
val auxBase = (ThisBuild / baseDirectory).value / "library-aux/src"
991+
auxBase ** "*.scala" pair io.Path.relativeTo(auxBase)
992+
},
989993
)
990994

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

0 commit comments

Comments
 (0)