Skip to content

Commit 27bd975

Browse files
committed
Add sources of synthetic classes to sources jar
1 parent 61a15b2 commit 27bd975

File tree

5 files changed

+33
-1
lines changed

5 files changed

+33
-1
lines changed

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

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

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] = A & B

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] = A | B

project/Build.scala

+5-1
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,11 @@ object Build {
987987
"-sourcepath", (Compile / sourceDirectories).value.map(_.getAbsolutePath).distinct.mkString(File.pathSeparator),
988988
"-Yexplicit-nulls",
989989
),
990-
(Compile / doc / scalacOptions) ++= ScaladocConfigs.DefaultGenerationSettings.value.settings
990+
(Compile / doc / scalacOptions) ++= ScaladocConfigs.DefaultGenerationSettings.value.settings,
991+
(Compile / packageSrc / mappings) ++= {
992+
val auxBase = (ThisBuild / baseDirectory).value / "library-aux/src"
993+
auxBase ** "*.scala" pair io.Path.relativeTo(auxBase)
994+
},
991995
)
992996

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

0 commit comments

Comments
 (0)