fun test_1(value: Any?): String? {
  return { // BLOCK
    val tmp_0: Any? = value
    when {
      EQEQ(arg0 = tmp_0, arg1 = null) -> null
      else -> tmp_0.let<Any, Nothing>(block = local fun <anonymous>(it: Any): Nothing {
        return "O"
      }
)
    }
  }
}

fun test_2(value: Any?): String? {
  return run<Nothing?>(block = local fun <anonymous>(): Nothing? {
    return { // BLOCK
      val tmp_1: Any? = value
      when {
        EQEQ(arg0 = tmp_1, arg1 = null) -> null
        else -> tmp_1.let<Any, Nothing>(block = local fun <anonymous>(it: Any): Nothing {
          return "K"
        }
)
      }
    }
  }
)
}

fun box(): String {
  var result: String = ""
  result = result.plus(other = { // BLOCK
    val tmp_2: String? = test_1(value = 1)
    when {
      EQEQ(arg0 = tmp_2, arg1 = null) -> return "fail 1"
      else -> tmp_2
    }
  })
  result = result.plus(other = { // BLOCK
    val tmp_3: String? = test_2(value = 1)
    when {
      EQEQ(arg0 = tmp_3, arg1 = null) -> return "fail 2"
      else -> tmp_3
    }
  })
  return result
}
