//
// Source
// ------------------------------------------

import androidx.compose.runtime.*

fun interface Consumer<T> {
    @Composable fun consume(t: T)
}

class Repro<T : Any> {
    fun test(consumer: Consumer<in T>) {}
}

fun test() {
    Repro<String>().test { string ->
        println(string)
    }
}

//
// Transformed IR
// ------------------------------------------

interface Consumer<T>  {
  @Composable
  @FunctionKeyMeta(key = -747777478, startOffset = 116, endOffset = 133)
  abstract fun consume(t: T, %composer: Composer?, %changed: Int)
}
@StabilityInferred(parameters = 2)
class Repro<T: Any>  {
  fun test(consumer: Consumer<in T>) { }
  static val %stable: Int = 0
}
fun test() {
  Repro().test(<block>{
    class <no name provided> : Consumer<Any?> {
      @Composable
      @FunctionKeyMeta(key = 2097238722, startOffset = 315, endOffset = 380)
      override fun consume(string: String, %composer: Composer?, %changed: Int) {
        %composer = %composer.startRestartGroup(<>)
        sourceInformation(%composer, "C(consume):Test.kt")
        val %dirty = %changed
        if (%changed and 0b0110 == 0) {
          %dirty = %dirty or if (%composer.changed(string)) 0b0100 else 0b0010
        }
        if (%changed and 0b00110000 == 0) {
          %dirty = %dirty or if (%composer.changed(<this>)) 0b00100000 else 0b00010000
        }
        if (%composer.shouldExecute(%dirty and 0b00010011 != 0b00010010, %dirty and 0b0001)) {
          if (isTraceInProgress()) {
            traceEventStart(<>, %dirty, -1, <>)
          }
          println(string)
          if (isTraceInProgress()) {
            traceEventEnd()
          }
        } else {
          %composer.skipToGroupEnd()
        }
        val tmp0_rcvr = <this>
        %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
          tmp0_rcvr.consume(string, %composer, updateChangedFlags(%changed or 0b0001))
        }
      }
    }
    <no name provided>()
  })
}
