Skip to content

Commit 78e3f68

Browse files
Mõškovski StanislavMõškovski Stanislav
Mõškovski Stanislav
authored and
Mõškovski Stanislav
committed
Remove 'new' keyword when creating case class
Remove 'new' keyword when creating instances of case class in 'Lower type bounds' section.
1 parent a83d2fd commit 78e3f68

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

_ba/tour/lower-type-bounds.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ case class EuropeanSwallow() extends Bird
6868
6969
val africanSwallowList= ListNode[AfricanSwallow](AfricanSwallow(), Nil())
7070
val birdList: Node[Bird] = africanSwallowList
71-
birdList.prepend(new EuropeanSwallow)
71+
birdList.prepend(EuropeanSwallow())
7272
```
7373
`Node[Bird]` može biti dodijeljena `africanSwallowList` ali onda prihvatiti `EuropeanSwallow`e.

_ja/tour/lower-type-bounds.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ case class EuropeanSwallow() extends Bird
6969
7070
val africanSwallowList= ListNode[AfricanSwallow](AfricanSwallow(), Nil())
7171
val birdList: Node[Bird] = africanSwallowList
72-
birdList.prepend(new EuropeanSwallow)
72+
birdList.prepend(EuropeanSwallow())
7373
```
7474
`Node[Bird]``africanSwallowList`をアサインできますが、その後`EuropeanSwallow`を受け入れられます。
7575

_ru/tour/lower-type-bounds.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ case class EuropeanSwallow() extends Bird
6565
6666
val africanSwallowList= ListNode[AfricanSwallow](AfricanSwallow(), Nil())
6767
val birdList: Node[Bird] = africanSwallowList
68-
birdList.prepend(new EuropeanSwallow)
68+
birdList.prepend(EuropeanSwallow())
6969
```
7070
`Node[Bird]` может быть присвоен `africanSwallowList` , но затем может добавлять и `EuropeanSwallow`.

_tour/lower-type-bounds.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ case class EuropeanSwallow() extends Bird
6262
6363
val africanSwallowList= ListNode[AfricanSwallow](AfricanSwallow(), Nil())
6464
val birdList: Node[Bird] = africanSwallowList
65-
birdList.prepend(new EuropeanSwallow)
65+
birdList.prepend(EuropeanSwallow())
6666
```
6767
The `Node[Bird]` can be assigned the `africanSwallowList` but then accept `EuropeanSwallow`s.

_zh-cn/tour/lower-type-bounds.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ case class EuropeanSwallow() extends Bird
6262
6363
val africanSwallowList= ListNode[AfricanSwallow](AfricanSwallow(), Nil())
6464
val birdList: Node[Bird] = africanSwallowList
65-
birdList.prepend(new EuropeanSwallow)
65+
birdList.prepend(EuropeanSwallow())
6666
```
6767
可以为 `Node[Bird]` 赋值 `africanSwallowList`,然后再加入一个 `EuropeanSwallow`

0 commit comments

Comments
 (0)