This is a quick overview of expressions in Kotlin.
Atomic expressions are
- Literal constants (see Basic types, Strings)
- Tuple literals
- Variable names or field references
- Object expressions
- Parenthesized expression
- Control structures (if, when, try)
- Function literals
- this expressions
- break, continue or return
- note that these are expressions that are typed with the type Nothing
See the grammar for atomic expressions.
- . – for member access
- ?. and ?: – for Null-safety
- && and || – for incomplete boolean evaluation