Skip to content

Commit 15a25e7

Browse files
authored
Merge pull request #10789 from dotty-staging/scala3doc/lang-import-docs
Document new language imports
2 parents 041e5dd + a3a7d97 commit 15a25e7

File tree

1 file changed

+44
-5
lines changed

1 file changed

+44
-5
lines changed

library/src/scala/runtime/stdLibPatches/language.scala

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,38 @@ object language:
2525
*/
2626
//object dependent
2727

28-
/** Experimental support for named type arguments */
28+
/** Experimental support for named type arguments.
29+
*
30+
* @see [[https://dotty.epfl.ch/docs/reference/other-new-features/named-typeargs]]
31+
*/
2932
object namedTypeArguments
3033

31-
/** Experimental support for generic number literals */
34+
/** Experimental support for generic number literals.
35+
*
36+
* @see [[https://dotty.epfl.ch/docs/reference/changed-features/numeric-literals]]
37+
*/
3238
object genericNumberLiterals
3339
end experimental
3440

35-
/** Where imported, auto-tupling is disabled */
41+
/** Where imported, auto-tupling is disabled.
42+
*
43+
* '''Why control the feature?''' Auto-tupling can lead to confusing and
44+
* brittle code in presence of overloads. In particular, surprising overloads
45+
* can be selected, and adding new overloads can change which overload is selected
46+
* in suprising ways.
47+
*
48+
* '''Why allow it?''' Not allowing auto-tupling is difficult to reconcile with
49+
* operators accepting tuples.
50+
*/
3651
object noAutoTupling
3752

38-
/** Where imported, loose equality using eqAny is disabled */
53+
/** Where imported, loose equality using eqAny is disabled.
54+
*
55+
* '''Why allow and control the feature?''' For compatibility and migration reasons,
56+
* strict equality is opt-in. See linked documentation for more information.
57+
*
58+
* @see [[https://dotty.epfl.ch/docs/reference/contextual/multiversal-equality]]
59+
*/
3960
object strictEquality
4061

4162
/** Where imported, ad hoc extensions of non-open classes in other
@@ -56,9 +77,27 @@ object language:
5677
*/
5778
object adhocExtensions
5879

59-
/** Source version */
80+
/** Set source version to 3.0-migration.
81+
*
82+
* @see [[https://scalacenter.github.io/scala-3-migration-guide/docs/scala-3-migration-mode]]
83+
*/
6084
object `3.0-migration`
85+
86+
/** Set source version to 3.0.
87+
*
88+
* @see [[https://scalacenter.github.io/scala-3-migration-guide/docs/scala-3-migration-mode]]
89+
*/
6190
object `3.0`
91+
92+
/** Set source version to 3.1-migration.
93+
*
94+
* @see [[https://scalacenter.github.io/scala-3-migration-guide/docs/scala-3-migration-mode]]
95+
*/
6296
object `3.1-migration`
97+
98+
/** Set source version to 3.1
99+
*
100+
* @see [[https://scalacenter.github.io/scala-3-migration-guide/docs/scala-3-migration-mode]]
101+
*/
63102
object `3.1`
64103
end language

0 commit comments

Comments
 (0)