Skip to content

Glossary: Kotlin Beyond the Basics

cast

Also written: as

Telling Kotlin to treat a value as another type with `as`. It throws an exception if the value isn't that type.

Where the book teaches it

Related terms

reified