mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-30 14:58:04 +03:00
Merge pull request #919 from geoffliu/master
[en/Scala] Better wording about breaks in cases
This commit is contained in:
commit
6fffdc56c0
@ -409,7 +409,7 @@ val otherGeorge = george.copy(phoneNumber = "9876")
|
||||
|
||||
// Pattern matching is a powerful and commonly used feature in Scala. Here's how
|
||||
// you pattern match a case class. NB: Unlike other languages, Scala cases do
|
||||
// not have breaks.
|
||||
// not need breaks, fall-through does not happen.
|
||||
|
||||
def matchPerson(person: Person): String = person match {
|
||||
// Then you specify the patterns:
|
||||
|
Loading…
Reference in New Issue
Block a user