You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/06_productivity_boosters/04_Smart Casts.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ fun main() {
41
41
1. Declares a nullable variable.
42
42
2. Smart-cast to non-nullable (thus allowing direct access to `isLeapYear`).
43
43
3. Smart-cast inside a condition (this is possible because, like Java, Kotlin uses [short-circuiting](https://en.wikipedia.org/wiki/Short-circuit_evaluation)).
44
-
4. Smart-cast inside acondition (also enabled by short-circuiting).
44
+
4. Smart-cast inside a condition (also enabled by short-circuiting).
45
45
5. Smart-cast to the subtype `LocalDate`.
46
46
47
47
This way, you can automatically use variables as desired in most cases without doing obvious casts manually.
0 commit comments