Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ paths:
metadata:
pattern: tool-wrapper
updated: "2026-08-25"
content_hash: "836e27d3196f88f3b6ea039fc3b992856d4594042d44c040faaca41e3ebed5d0"
content_hash: "66104d00a364bbfaabe0af5b0c3eee49a34bd48dc91939a40b713ec4d4e61f24"
---

# Type-Safety Discipline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fun send(invite: Invite) = when (invite) {
}
```

`sealed` constrains subclasses to the same compilation unit (Kotlin 1.5+). Kotlin 1.7+ checks exhaustiveness for `when` over sealed, enum, and Boolean subjects in both expression and statement form.
`sealed` permits direct subclasses anywhere in the same package and module (Kotlin 1.5+; multiplatform projects also require the same source set). Kotlin 1.7+ checks exhaustiveness for `when` over sealed, enum, and Boolean subjects in both expression and statement form.

### Exhaustive `when`

Expand Down