Guest User

Untitled

a guest
Nov 21st, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class QuickTest {
  2.  
  3. var nullableThing: Int? = 55
  4.  
  5. var nullThing: Int? = null
  6.  
  7. @Test
  8. fun `test let behaviour`() {
  9. nullableThing?.let {
  10. print("Nullable thing was non-null")
  11. nullThing?.apply { print("Never happens") }
  12. } ?: run {
  13. fail("This shouldn't have run")
  14. }
  15. }
  16. }
Add Comment
Please, Sign In to add comment