Skip to content

Commit e40add2

Browse files
authored
Merge branch 'scala:main' into zh-cn/overviews/scala3-book/scala-tools
2 parents b870861 + 16e46c2 commit e40add2

File tree

9 files changed

+81
-56
lines changed

9 files changed

+81
-56
lines changed

_overviews/parallel-collections/concrete-parallel-collections.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ is an ordered sequence of elements equally spaced apart. A parallel range is
8484
created in a similar way as the sequential
8585
[Range](https://www.scala-lang.org/api/{{ site.scala-212-version }}/scala/collection/immutable/Range.html):
8686

87-
scala> 1 to 3 par
87+
scala> (1 to 3).par
8888
res0: scala.collection.parallel.immutable.ParRange = ParRange(1, 2, 3)
8989

90-
scala> 15 to 5 by -2 par
90+
scala> (15 to 5 by -2).par
9191
res1: scala.collection.parallel.immutable.ParRange = ParRange(15, 13, 11, 9, 7, 5)
9292

9393
Just as sequential ranges have no builders, parallel ranges have no
@@ -146,7 +146,7 @@ and
146146
scala> val phs = scala.collection.parallel.immutable.ParHashSet(1 until 1000: _*)
147147
phs: scala.collection.parallel.immutable.ParHashSet[Int] = ParSet(645, 892, 69, 809, 629, 365, 138, 760, 101, 479,...
148148

149-
scala> phs map { x => x * x } sum
149+
scala> phs.map(x => x * x).sum
150150
res0: Int = 332833500
151151

152152
Similar to parallel hash tables, parallel hash trie

_overviews/scala3-book/types-others.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ Scala has several other advanced types that are not shown in this book, includin
2121
- Refinement types
2222
- Kind polymorphism
2323

24-
For more details on these types, see the [Scala 3 Reference documentation][reference].
24+
For more details on most of these types, refer to the [Scala 3 Reference documentation][reference].
25+
For singleton types see the [literal types](https://scala-lang.org/files/archive/spec/3.4/03-types.html#literal-types) section of the Scala 3 spec,
26+
and for refinement types, see the [refined types](https://scala-lang.org/files/archive/spec/3.4/03-types.html) section.
2527

2628

2729

_overviews/scala3-migration/options-lookup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ since the configuration syntax and the error messages it matches are different.
144144
| 2.13.x | 3.3.x |
145145
|-|-|
146146
| `-Xasync` | <i class="fa fa-times fa-lg"></i> |
147-
| `-Xcheckinit` | `-Ycheck-init` |
147+
| `-Xcheckinit` | `-Ysafe-init` |
148148
| `-Xdev` | <i class="fa fa-times fa-lg"></i> |
149149
| `-Xdisable-assertions` | <i class="fa fa-times fa-lg"></i> |
150150
| `-Xelide-below` | <i class="fa fa-times fa-lg"></i> |

_sips/sips/42.type.md

Lines changed: 45 additions & 45 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: SIP-60 - Alternative bind patterns
3+
status: under-review
4+
pull-request-number: 74
5+
stage: design
6+
7+
---

_sips/sips/binary-api.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ title: SIP-52 - Binary APIs
1212

1313
| Date | Version |
1414
|---------------|------------------------|
15-
| Feb 27 2022 | Initial Draft |
16-
| Aug 16 2022 | Single Annotation |
17-
| Aug 24 2022 | Change Annotation Name |
15+
| Feb 27 2023 | Initial Draft |
16+
| Aug 16 2023 | Single Annotation |
17+
| Aug 24 2023 | Change Annotation Name |
18+
| Jan 09 2024 | Change Overload Rules |
1819

1920
## Summary
2021

@@ -73,7 +74,7 @@ This proposal introduces the `@publicInBinary` annotation, and adds a migration
7374

7475
#### `@publicInBinary` annotation
7576

76-
A binary API is a definition that is annotated with `@publicInBinary` or overrides a definition annotated with `@publicInBinary`.
77+
A binary API is a definition that is annotated with `@publicInBinary`.
7778
This annotation can be placed on `def`, `val`, `lazy val`, `var`, `object`, and `given` definitions.
7879
A binary API will be publicly available in the bytecode.
7980

@@ -222,6 +223,7 @@ final class publicInBinary extends scala.annotation.StaticAnnotation
222223
#### `@publicInBinary` annotation
223224

224225
* Only valid on `def`, `val`, `lazy val`, `var`, `object`, and `given`.
226+
* If a definition overrides a `@publicInBinary` definition, it must also be annotated with `@publicInBinary`.
225227
* TASTy will contain references to non-public definitions that are out of scope but `@publicInBinary`. TASTy already allows those references.
226228
* The annotated definitions will be public in the generated bytecode. Definitions should be made public as early as possible in the compiler phases, as this can remove the need to create other accessors. It should be done after we check the accessibility of references.
227229

_sips/sips/match-types-spec.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
layout: sip
33
permalink: /sips/:title.html
4-
stage: implementation
5-
status: waiting-for-implementation
4+
stage: completed
5+
status: accepted
66
title: SIP-56 - Proper Specification for Match Types
77
---
88

_sips/sips/multiple-assignments.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: SIP-59 - Multiple assignments
3+
status: under-review
4+
pull-request-number: 73
5+
stage: design
6+
7+
---

_sips/sips/named-tuples.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: SIP-58 - Named Tuples
3+
status: under-review
4+
pull-request-number: 72
5+
stage: design
6+
7+
---

0 commit comments

Comments
 (0)