8000 Specify Scala 2 in if snippet · aresen/docs.scala-lang@cbc6d00 · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit cbc6d00

Browse files
aresenjulienrf
andauthored
Specify Scala 2 in if snippet
Co-authored-by: Julien Richard-Foy <julien@richard-foy.fr>
1 parent d0adf5f commit cbc6d00

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

_overviews/scala3-book/taste-control-structures.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ As you’ll see throughout this book, _all_ Scala control structures can be used
4848
The `if`/`else` control struture in Scala 2 was constructed differently, with parentheses required and curly brackets instead of the keyword `then`.
4949

5050
```scala
51+
// Scala 2 syntax
5152
if (test1) {
5253
doX()
5354
} else if (test2) {

0 commit comments

Comments
 (0)
0