Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class QuickTest {
- var nullableThing: Int? = 55
- var nullThing: Int? = null
- @Test
- fun `test let behaviour`() {
- nullableThing?.let {
- print("Nullable thing was non-null")
- nullThing?.apply { print("Never happens") }
- } ?: run {
- fail("This shouldn't have run")
- }
- }
- }
Add Comment
Please, Sign In to add comment