Skip to content

Commit

Permalink
update: remove nullable boolean "idiom" (#3818)
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianAigner authored Oct 10, 2023
1 parent 67e00ae commit e5419e9
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions docs/topics/idioms.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,17 +330,6 @@ stream.buffered().reader().use { reader ->
inline fun <reified T: Any> Gson.fromJson(json: JsonElement): T = this.fromJson(json, T::class.java)
```

## Nullable Boolean

```kotlin
val b: Boolean? = ...
if (b == true) {
...
} else {
// `b` is false or null
}
```

## Swap two variables

```kotlin
Expand Down

0 comments on commit e5419e9

Please sign in to comment.