Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update sealed-classes.md
  • Loading branch information
v43d3rm4k4r committed Aug 27, 2022
commit 2c4e8eda7fe9a520076e049dd947a0b267033b2f
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}") }
is RuntimeError -> { println("Runtime error") }
RuntimeError -> { println("Runtime error") }
// оператор `else` не требуется, потому что мы покрыли все возможные случаи
}
```
Expand Down