1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-06 14:56:54 +02:00

Merge pull request #919 from geoffliu/master

[en/Scala] Better wording about breaks in cases
This commit is contained in:
Levi Bostian
2015-01-11 22:56:19 -06:00

View File

@@ -409,7 +409,7 @@ val otherGeorge = george.copy(phoneNumber = "9876")
// Pattern matching is a powerful and commonly used feature in Scala. Here's how // 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 // 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 { def matchPerson(person: Person): String = person match {
// Then you specify the patterns: // Then you specify the patterns: