Skip to content

Commit a28ad15

Browse files
authored
Merge branch 'scala:main' into zh-cn/overviews/scala3-book/ca-context-bounds
2 parents b76d864 + 86c9d2f commit a28ad15

File tree

224 files changed

+6819
-1789
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+6819
-1789
lines changed

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (7.0.4.3)
4+
activesupport (7.0.7.2)
55
concurrent-ruby (~> 1.0, >= 1.0.2)
66
i18n (>= 1.6, < 2)
77
minitest (>= 5.1)
@@ -13,7 +13,7 @@ GEM
1313
execjs
1414
coffee-script-source (1.11.1)
1515
colorator (1.1.0)
16-
commonmarker (0.23.9)
16+
commonmarker (0.23.10)
1717
concurrent-ruby (1.2.2)
1818
dnsruby (1.61.9)
1919
simpleidn (~> 0.1)
@@ -95,7 +95,7 @@ GEM
9595
yell (~> 2.0)
9696
zeitwerk (~> 2.5)
9797
http_parser.rb (0.8.0)
98-
i18n (1.12.0)
98+
i18n (1.14.1)
9999
concurrent-ruby (~> 1.0)
100100
jekyll (3.9.3)
101101
addressable (~> 2.4)
@@ -218,7 +218,7 @@ GEM
218218
jekyll (>= 3.5, < 5.0)
219219
jekyll-feed (~> 0.9)
220220
jekyll-seo-tag (~> 2.1)
221-
minitest (5.18.0)
221+
minitest (5.19.0)
222222
nokogiri (1.14.3-arm64-darwin)
223223
racc (~> 1.4)
224224
nokogiri (1.14.3-x64-mingw-ucrt)

_ba/tour/implicit-conversions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ Možete, zato što `Predef` uključuje slj. implicitnu konverziju:
4646
```scala mdoc
4747
import scala.language.implicitConversions
4848

49-
implicit def int2Integer(x: Int) =
50-
java.lang.Integer.valueOf(x)
49+
implicit def int2Integer(x: Int): Integer =
50+
Integer.valueOf(x)
5151
```
5252

5353
Pošto su implicitne konverzije opasne ako se koriste pogrešno, kompajler upozorava kada kompajlira definiciju implicitne konverzije.

_cheatsheets/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ breakable {
331331
var y = x
332332
val readonly = 5
333333
private var secret = 1
334-
def this = this(42)
334+
def this() = this(42)
335335
}</code></pre></td>
336336
<td>Constructor is class body.<br />Declare a public member.<br />Declare a gettable but not settable member.<br />Declare a private member.<br />Alternative constructor.</td>
337337
</tr>

_config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ keywords:
1515
- Document
1616
- Guide
1717

18-
scala-version: 2.13.10
19-
scala-212-version: 2.12.17
20-
scala-3-version: 3.2.2
18+
scala-version: 2.13.12
19+
scala-212-version: 2.12.18
20+
scala-3-version: 3.3.1
2121

2222
collections:
2323
style:

_data/footer.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
links:
2222
- title: Community
2323
url: "http://scala-lang.org/community/"
24+
- title: Governance
25+
url: "http://scala-lang.org/community/index.html#governance"
2426
- title: Mailing Lists
2527
url: "http://scala-lang.org/community/index.html#mailing-lists"
2628
- title: Chat Rooms & More

_includes/_markdown/install-munit.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
{% tab 'Scala CLI' %}
55
You can require the entire toolkit in a single line:
66
```scala
7-
//> using dep "org.scala-lang::toolkit-test:0.1.7"
7+
//> using toolkit latest
88
```
9+
MUnit, being a testing framework, is only available in test files: files in a `test` directory or ones that have the `.test.scala` extension. Refer to the [Scala CLI documentation](https://scala-cli.virtuslab.org/docs/commands/test/) to learn more about the test scope.
910

1011
Alternatively, you can require just a specific version of MUnit:
1112
```scala
12-
//> using dep "org.scalameta::munit:1.0.0-M7"
13+
//> using dep org.scalameta::munit:1.0.0-M7
1314
```
1415
{% endtab %}
1516
{% tab 'sbt' %}

_includes/_markdown/install-os-lib.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
{% tab 'Scala CLI' %}
55
You can require the entire toolkit in a single line:
66
```scala
7-
//> using toolkit "latest"
7+
//> using toolkit latest
88
```
99

1010
Alternatively, you can require just a specific version of OS-Lib:
1111
```scala
12-
//> using dep "com.lihaoyi::os-lib:0.9.1"
12+
//> using dep com.lihaoyi::os-lib:0.9.1
1313
```
1414
{% endtab %}
1515
{% tab 'sbt' %}

_includes/_markdown/install-sttp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
{% tab 'Scala CLI' %}
55
You can require the entire toolkit in a single line:
66
```scala
7-
//> using toolkit "latest"
7+
//> using toolkit latest
88
```
99

1010
Alternatively, you can require just a specific version of sttp:
1111
```scala
12-
//> using dep "com.softwaremill.sttp.client4::core:4.0.0-M1"
12+
//> using dep com.softwaremill.sttp.client4::core:4.0.0-M1
1313
```
1414
{% endtab %}
1515
{% tab 'sbt' %}

_includes/_markdown/install-upickle.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
{% tab 'Scala CLI' %}
55
Using Scala CLI, you can require the entire toolkit in a single line:
66
```scala
7-
//> using toolkit "latest"
7+
//> using toolkit latest
88
```
99

1010
Alternatively, you can require just a specific version of UPickle:
1111
```scala
12-
//> using dep "com.lihaoyi::upickle:3.1.0
12+
//> using dep com.lihaoyi::upickle:3.1.0
1313
```
1414
{% endtab %}
1515
{% tab 'sbt' %}

_includes/inner-documentation-sections.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,19 @@
44

55
<div class="documentation">
66
{% for link in include.links %}
7+
8+
<!-- check if link starts with '#' -->
9+
{% assign first_char = link.link | slice: 0 %}
10+
{% if first_char == '#' %}
11+
{% assign is_url = false %}
12+
{% else %}
13+
{% assign is_url = true %}
14+
{% endif %}
15+
716
<a href="{% if link.link contains '://' %}{{link.link}}{% else %}{{site.baseurl}}{{link.link}}{% endif %}"
8-
class="doc-item doc-item-link">
17+
class="doc-item doc-item-link"
18+
{% if is_url %}target="_blank" rel="noopener noreferrer"{% endif %}
19+
>
920
<div class="doc-item-header">
1021
<i class="{{link.icon}}"></i>
1122
<h4>{{link.title}}</h4>

_includes/version-specific-notice.html

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,29 @@
22
<blockquote class="help-info">
33
<i class="fa fa-info"></i><span style="margin-left: 0.5rem">
44
{% if include.language == 'scala3' %}
5-
This doc page is specific to Scala 3,
6-
and may cover new concepts not available in Scala 2. Unless
7-
otherwise stated, all the code examples in this page assume
8-
you are using Scala 3.
5+
{% if include.page-language == 'ru' %}
6+
Эта страница документа относится к Scala 3 и
7+
может охватывать новые концепции, недоступные в Scala 2.
8+
Если не указано явно, все примеры кода на этой странице
9+
предполагают, что вы используете Scala 3.
10+
{% else %}
11+
This doc page is specific to Scala 3,
12+
and may cover new concepts not available in Scala 2. Unless
13+
otherwise stated, all the code examples in this page assume
14+
you are using Scala 3.
15+
{% endif %}
916
{% else if include.language == 'scala2' %}
10-
This doc page is specific to features shipped in Scala 2,
11-
which have either been removed in Scala 3 or replaced by an
12-
alternative. Unless otherwise stated, all the code examples
13-
in this page assume you are using Scala 2.
17+
{% if include.page-language == 'ru' %}
18+
Эта страница документа относится к функциям, представленным в Scala 2,
19+
которые либо были удалены в Scala 3, либо заменены альтернативными.
20+
Если не указано явно, все примеры кода на этой странице предполагают,
21+
что вы используете Scala 2.
22+
{% else %}
23+
This doc page is specific to features shipped in Scala 2,
24+
which have either been removed in Scala 3 or replaced by an
25+
alternative. Unless otherwise stated, all the code examples
26+
in this page assume you are using Scala 2.
27+
{% endif %}
1428
{% endif %}
1529
</span>
1630
</blockquote>

0 commit comments

Comments
 (0)