enum class A : Enum<A> {
  V1 = A()

  private constructor() /* primary */ {
    super/*Enum*/<A>()
    /* <init>() */

  }

  fun valueOf(value: String): A /* Synthetic body for ENUM_VALUEOF */

  fun values(): Array<A> /* Synthetic body for ENUM_VALUES */

  val entries: EnumEntries<A>
    get(): EnumEntries<A> /* Synthetic body for ENUM_ENTRIES */

}

fun testAnnotated_throwsJvm(a: A) {
  { // BLOCK
    val tmp_0: A = a
    when {
      EQEQ(arg0 = tmp_0, arg1 = A.V1) -> 1 /*~> Unit */
    }
  }
}

fun testExpression_throws(a: A): Int {
  return { // BLOCK
    val tmp_1: A = a
    when {
      EQEQ(arg0 = tmp_1, arg1 = A.V1) -> 1
      else -> noWhenBranchMatchedException()
    }
  }
}

fun testIfTheElseAnnotated_throwsJvm(a: A, flag: Boolean) {
  when {
    flag -> 0 /*~> Unit */
    else -> { // BLOCK
      { // BLOCK
        val tmp_2: A = a
        when {
          EQEQ(arg0 = tmp_2, arg1 = A.V1) -> 1 /*~> Unit */
        }
      }
    }
  }
}

fun testIfTheElseParenthesized_throwsJvm(a: A, flag: Boolean) {
  when {
    flag -> 0 /*~> Unit */
    else -> { // BLOCK
      { // BLOCK
        val tmp_3: A = a
        when {
          EQEQ(arg0 = tmp_3, arg1 = A.V1) -> 1 /*~> Unit */
        }
      }
    }
  }
}

fun testIfTheElseStatement_empty(a: A, flag: Boolean) {
  when {
    flag -> 0 /*~> Unit */
    else -> { // BLOCK
      { // BLOCK
        val tmp_4: A = a
        when {
          EQEQ(arg0 = tmp_4, arg1 = A.V1) -> 1 /*~> Unit */
        }
      }
    }
  }
}

fun testLambdaResultExpression_throws(a: A) {
  local fun <anonymous>(): Int {
    return { // BLOCK
      val tmp_5: A = a
      when {
        EQEQ(arg0 = tmp_5, arg1 = A.V1) -> 1
        else -> noWhenBranchMatchedException()
      }
    }
  }
.invoke() /*~> Unit */
}

fun testParenthesized_throwsJvm(a: A) {
  { // BLOCK
    val tmp_6: A = a
    when {
      EQEQ(arg0 = tmp_6, arg1 = A.V1) -> 1 /*~> Unit */
    }
  }
}

fun testStatement_empty(a: A) {
  { // BLOCK
    val tmp_7: A = a
    when {
      EQEQ(arg0 = tmp_7, arg1 = A.V1) -> 1 /*~> Unit */
    }
  }
}

fun testVariableAssignment_throws(a: A) {
  val x: Int
  { // BLOCK
    val tmp_8: A = a
    when {
      EQEQ(arg0 = tmp_8, arg1 = A.V1) -> x = 11
      else -> noWhenBranchMatchedException()
    }
  }
}

