abstract class A<T : Any?> : Java1<T> {
  constructor() /* primary */ {
    super/*Java1*/<@FlexibleNullability T?>()
    /* <init>() */

  }

}

abstract class B<T : Any?> : Java1<T> {
  constructor() /* primary */ {
    super/*Java1*/<@FlexibleNullability T?>()
    /* <init>() */

  }

  override operator fun get(key: T?): T? {
    return CHECK_NOT_NULL<Nothing>(arg0 = null)
  }

  override fun isEmpty(): Boolean {
    return CHECK_NOT_NULL<Nothing>(arg0 = null)
  }

  override val size: Int
    override get(): Int {
      return 5
    }

}

abstract class KotlinClass<T : Any?> : SortedMap<T, T> {
  constructor() /* primary */ {
    super/*Any*/()
    /* <init>() */

  }

}

fun test(a: A<Boolean>, b: B<Boolean?>) {
  a.<get-size>() /*~> Unit */
  a.set<@FlexibleNullability Boolean?, @FlexibleNullability Boolean?>(key = true, value = true)
  a.put(key = null, value = null) /*~> Unit */
  a.get(key = true) /*~> Unit */
  a.get(key = null) /*~> Unit */
  a.remove(key = null) /*~> Unit */
  a.remove(key = true) /*~> Unit */
  a.isNotEmpty<@FlexibleNullability Boolean?, @FlexibleNullability Boolean?>() /*~> Unit */
  b.<get-size>() /*~> Unit */
  b.put(key = false, value = false) /*~> Unit */
  b.put(key = null, value = null) /*~> Unit */
  b.set<Boolean?, Boolean?>(key = null, value = null)
  b.set<Boolean?, Boolean?>(key = true, value = true)
  b.get(key = null) /*~> Unit */
  b.get(key = true) /*~> Unit */
  b.remove(key = null) /*~> Unit */
  b.remove(key = true) /*~> Unit */
  b.isEmpty() /*~> Unit */
}
