Skip to content

Commit c217cef

Browse files
authored
Fix a typo in scala3 book (#2440)
1 parent 323df5e commit c217cef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_overviews/scala3-book/packaging-imports.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ package foo
199199
import scala.util.Random
200200

201201
class ClassA:
202-
def printRandom:
202+
def printRandom(): Unit =
203203
val r = new Random // use the imported class
204204
// more code here...
205205
```
@@ -211,7 +211,7 @@ package foo
211211

212212
class ClassA:
213213
import scala.util.Random // inside ClassA
214-
def printRandom {
214+
def printRandom(): Unit =
215215
val r = new Random
216216
// more code here...
217217

0 commit comments

Comments
 (0)