Skip to content

Commit 0ed0073

Browse files
authored
Update pattern-matching.md
Added a note about sealed traits because it is the first usage of them in the guide.
1 parent 04f8bf9 commit 0ed0073

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_tour/pattern-matching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ case class VoiceRecording(contactName: String, link: String) extends Notificatio
9292
{% endtab %}
9393
{% endtabs %}
9494

95-
`Notification` is a sealed trait which has three concrete Notification types implemented with case classes `Email`, `SMS`, and `VoiceRecording`. Now we can do pattern matching on these case classes:
95+
`Notification` is a sealed trait which has three concrete Notification types implemented with case classes `Email`, `SMS`, and `VoiceRecording`. (A sealed trait can be extended only in the same file as its declaration.) Now we can do pattern matching on these case classes:
9696

9797
{% tabs pattern-matching-4 class=tabs-scala-version %}
9898
{% tab 'Scala 2' for=pattern-matching-4 %}

0 commit comments

Comments
 (0)