From 6703af204c42783dae8dea5f738ad47ce79e1e72 Mon Sep 17 00:00:00 2001 From: v43d3rm4k4r Date: Sat, 20 Aug 2022 10:43:43 +0300 Subject: [PATCH] Fix typo --- sealed-classes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sealed-classes.md b/sealed-classes.md index 55c599c..4926f5a 100644 --- a/sealed-classes.md +++ b/sealed-classes.md @@ -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` не требуется, потому что мы покрыли все возможные случаи } ```