Skip to content
Closed
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
2 changes: 1 addition & 1 deletion sealed-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ However, this works only if you use `when` as an expression (using the result) a
fun log(e: Error) = when(e) {
is FileReadError -> { println("Error while reading file ${e.file}") }
is DatabaseError -> { println("Error while reading from database ${e.source}") }
RuntimeError -> { println("Runtime error") }
is RuntimeError -> { println("Runtime error") }
// оператор `else` не требуется, потому что мы покрыли все возможные случаи
}
```
Expand Down