From 50701f2d7749630a45b784236d7fff95ea2b67d0 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Ghaffari <13206657+mhghaffari@users.noreply.github.com> Date: Mon, 2 Jan 2023 17:03:33 +0330 Subject: [PATCH 1/3] Update pattern-matching.md The `VoiceRecording` case was not existed in the code to cause the warning. --- _tour/pattern-matching.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_tour/pattern-matching.md b/_tour/pattern-matching.md index 4ef988529b..60c00669a1 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(contactName: String, link: String) => + 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(contactName: String, link: String) => + s"You received a Voice Recording from $name! Click the link to hear it: $link" ``` {% endtab %} {% endtabs %} From 5af3d5ee7fd11585f92a0d660f8306a2e72fa116 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Ghaffari <13206657+mhghaffari@users.noreply.github.com> Date: Mon, 2 Jan 2023 18:04:44 +0330 Subject: [PATCH 2/3] Update _tour/pattern-matching.md Co-authored-by: Philippus Baalman --- _tour/pattern-matching.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_tour/pattern-matching.md b/_tour/pattern-matching.md index 60c00669a1..8e3374c837 100644 --- a/_tour/pattern-matching.md +++ b/_tour/pattern-matching.md @@ -255,7 +255,7 @@ 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(contactName: String, link: String) => + case VoiceRecording(name, link) => s"You received a Voice Recording from $name! Click the link to hear it: $link" } } From 50c97d5d800e106f160e5bcc3a63b52fe0a64385 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Ghaffari <13206657+mhghaffari@users.noreply.github.com> Date: Mon, 2 Jan 2023 18:04:53 +0330 Subject: [PATCH 3/3] Update _tour/pattern-matching.md Co-authored-by: Philippus Baalman --- _tour/pattern-matching.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_tour/pattern-matching.md b/_tour/pattern-matching.md index 8e3374c837..8086f51b06 100644 --- a/_tour/pattern-matching.md +++ b/_tour/pattern-matching.md @@ -269,7 +269,7 @@ 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(contactName: String, link: String) => + case VoiceRecording(name, link) => s"You received a Voice Recording from $name! Click the link to hear it: $link" ``` {% endtab %}