class Ref {
  constructor(value: Int) /* primary */ {
    super/*Any*/()
    /* <init>() */

  }

  var value: Int
    field = value
    get
    set

}

interface IHost {
  fun String.extLength(): Int {
    return <this>.<get-length>()
  }

}

fun test1(x: String?): Int? {
  return { // BLOCK
    val tmp_0: String? = x
    when {
      EQEQ(arg0 = tmp_0, arg1 = null) -> null
      else -> tmp_0.<get-length>()
    }
  }
}

fun test2(x: String?): Int? {
  return { // BLOCK
    val tmp_1: String? = x
    when {
      EQEQ(arg0 = tmp_1, arg1 = null) -> null
      else -> tmp_1.hashCode()
    }
  }
}

fun test3(x: String?, y: Any?): Boolean? {
  return { // BLOCK
    val tmp_2: String? = x
    when {
      EQEQ(arg0 = tmp_2, arg1 = null) -> null
      else -> tmp_2.equals(other = y)
    }
  }
}

fun test4(x: Ref?) {
  { // BLOCK
    val tmp_3: Ref? = x
    when {
      EQEQ(arg0 = tmp_3, arg1 = null) -> null /*~> Unit */
      else -> tmp_3.<set-value>(<set-?> = 0)
    }
  }
}

fun IHost.test5(s: String?): Int? {
  return { // BLOCK
    val tmp_4: String? = s
    when {
      EQEQ(arg0 = tmp_4, arg1 = null) -> null
      else -> (<this>, tmp_4).extLength()
    }
  }
}

fun Int.foo(): Int {
  return 239
}

fun box() {
  { // BLOCK
    val tmp_5: Int = 42
    when {
      EQEQ(arg0 = tmp_5, arg1 = null) -> null
      else -> tmp_5.foo()
    }
  } /*~> Unit */
}
