Skip to content

Glossary: Kotlin Basics

smart cast

Also written: smart casts

Kotlin treating a value as a narrower type after a check. After `if (email != null)`, `email` is a plain String, and after `is Card`, `payment` is a Card.

Where the book teaches it

Related terms

nullis