Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _tour/pattern-matching.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ case class VoiceRecording(contactName: String, link: String) extends Notificatio
{% endtab %}
{% endtabs %}

`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:
`Notification` is a sealed trait which has three concrete Notification types implemented with case classes `Email`, `SMS`, and `VoiceRecording`. (A [sealed trait](#Sealed-types) can be extended only in the same file as its declaration.) Now we can do pattern matching on these case classes:

{% tabs pattern-matching-4 class=tabs-scala-version %}
{% tab 'Scala 2' for=pattern-matching-4 %}
Expand Down
Loading