diff --git a/_tour/pattern-matching.md b/_tour/pattern-matching.md index 4ef988529b..8086f51b06 100644 --- a/_tour/pattern-matching.md +++ b/_tour/pattern-matching.md @@ -255,6 +255,8 @@ def showNotification(notification: Notification): String = { s"You got an email from $sender with title: $title" case SMS(number, message) => s"You got an SMS from $number! Message: $message" + case VoiceRecording(name, link) => + s"You received a Voice Recording from $name! Click the link to hear it: $link" } } ``` @@ -267,6 +269,8 @@ def showNotification(notification: Notification): String = s"You got an email from $sender with title: $title" case SMS(number, message) => s"You got an SMS from $number! Message: $message" + case VoiceRecording(name, link) => + s"You received a Voice Recording from $name! Click the link to hear it: $link" ``` {% endtab %} {% endtabs %}