fun use(fn: Function1<Int, Any>): Any {
  return fn.invoke(p1 = 42)
}

class C {
  constructor(vararg xs: Int) /* primary */ {
    super/*Any*/()
    /* <init>() */

  }

}

class Outer {
  constructor() /* primary */ {
    super/*Any*/()
    /* <init>() */

  }

  inner class Inner {
    constructor(vararg xs: Int) /* primary */ {
      super/*Any*/()
      /* <init>() */

    }

  }

}

fun testConstructor(): Any {
  return use(fn = local fun <init>(p0: Int): C {
    return C(xs = [p0])
  }
)
}

fun testInnerClassConstructor(outer: Outer): Any {
  return use(fn = { // BLOCK
    local fun Outer.<init>(p0: Int): Inner {
      return receiver.Inner(xs = [p0])
    }

    outer::<init>
  })
}

fun testInnerClassConstructorCapturingOuter(): Any {
  return use(fn = { // BLOCK
    local fun Outer.<init>(p0: Int): Inner {
      return receiver.Inner(xs = [p0])
    }

    Outer()::<init>
  })
}
