-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add sources of synthetic classes to sources jar #20904
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,7 @@ | ||||||||||
package scala | ||||||||||
|
||||||||||
/** The super-type of all types. | ||||||||||
* | ||||||||||
* See [[https://docs.scala-lang.org/scala3/reference/other-new-features/kind-polymorphism.html]]. | ||||||||||
*/ | ||||||||||
final abstract class AnyKind | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It makes no sense for this type to be
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I based it on scala3/compiler/src/dotty/tools/dotc/core/Definitions.scala Lines 450 to 451 in 75a15c2
When trying to extend
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definitions is what works for the compiler with the minimum amount of work. From a spec point of view, (Arguably it should even be an abstract type as well, but since There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The docs even say "It is declared abstract and final" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package scala | ||
|
||
/** The base trait of types that can be safely pattern matched against. | ||
* | ||
* See [[https://docs.scala-lang.org/scala3/reference/other-new-features/matchable.html]]. | ||
*/ | ||
trait Matchable |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package scala | ||
|
||
/** The intersection of two types. | ||
* | ||
* See [[https://docs.scala-lang.org/scala3/reference/new-types/intersection-types.html]]. | ||
*/ | ||
type &[A, B] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package scala | ||
|
||
/** The union of two types. | ||
* | ||
* See [[https://docs.scala-lang.org/scala3/reference/new-types/union-types.html]]. | ||
*/ | ||
type |[A, B] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This docstring is copied from
Definitions.scala
:scala3/compiler/src/dotty/tools/dotc/core/Definitions.scala
Lines 2453 to 2458 in 010ed5a
It is also source of truth for scaladoc generation. I think those comments should be kept in sync.
Should I change it in
Definitions.scala
as well?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please!