Skip to content

Commit 27a4d87

Browse files
authored
Merge pull request #1583 from qiuyangnie/patch-1
Fix a little bug in the example code
2 parents 5a7b431 + 1ed6277 commit 27a4d87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_overviews/scala-book/match-expressions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ Here are a few other examples of how you can use `if` expressions in `case` stat
226226
```scala
227227
i match {
228228
case a if 0 to 9 contains a => println("0-9 range: " + a)
229-
case b if 10 to 19 contains b => println("10-19 range: " + a)
230-
case c if 20 to 29 contains c => println("20-29 range: " + a)
229+
case b if 10 to 19 contains b => println("10-19 range: " + b)
230+
case c if 20 to 29 contains c => println("20-29 range: " + c)
231231
case _ => println("Hmmm...")
232232
}
233233
```

0 commit comments

Comments
 (0)