abstract class A : HashMap, SortedMap { constructor() /* primary */ { super/*HashMap*/<@FlexibleNullability T?, @FlexibleNullability T?>() /* () */ } } abstract class B : HashMap, SortedMap { constructor() /* primary */ { super/*HashMap*/<@FlexibleNullability T?, @FlexibleNullability T?>() /* () */ } override fun put(key: T, value: T): T? { return CHECK_NOT_NULL(arg0 = null) } override fun remove(key: T): T { return CHECK_NOT_NULL(arg0 = null) } } fun test(a: A, b: B) { a.() /*~> Unit */ a.set(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 */ b.put(key = false, value = false) /*~> Unit */ b.set(key = true, value = true) b.remove(key = null) /*~> Unit */ }