fun interface KConsumer { abstract fun accept(x: T) } fun interface KRunnable { abstract fun run() } fun interface KSupplier { abstract fun get(): T } fun test1(): KFunction1<@ParameterName(name = "function") Function0, KRunnable> { return { // BLOCK local fun KRunnable(function: Function0): KRunnable { return CHECK_NOT_NULL>(arg0 = function) /*-> KRunnable */ } ::KRunnable } } fun test1a(): KFunction1<@ParameterName(name = "function") Function0, KRunnable> { return { // BLOCK local fun KRunnable(function: Function0): KRunnable { return CHECK_NOT_NULL>(arg0 = function) /*-> KRunnable */ } ::KRunnable } } fun test1b(): KFunction { return { // BLOCK local fun KRunnable(function: Function0): KRunnable { return CHECK_NOT_NULL>(arg0 = function) /*-> KRunnable */ } ::KRunnable } } fun test2(): Function1, KSupplier> { return { // BLOCK local fun KSupplier(function: Function0): KSupplier { return CHECK_NOT_NULL>(arg0 = function) /*-> KSupplier */ } ::KSupplier } } fun test2a(): Function1, KSupplier> { return { // BLOCK local fun KSupplier(function: Function0): KSupplier { return CHECK_NOT_NULL>(arg0 = function) /*-> KSupplier */ } ::KSupplier } } fun test3(): Function1, KConsumer> { return { // BLOCK local fun KConsumer(function: Function1<@ParameterName(name = "x") String, Unit>): KConsumer { return CHECK_NOT_NULL>(arg0 = function) /*-> KConsumer */ } ::KConsumer } } fun test3a(): Function1, KConsumer> { return { // BLOCK local fun KConsumer(function: Function1<@ParameterName(name = "x") String, Unit>): KConsumer { return CHECK_NOT_NULL>(arg0 = function) /*-> KConsumer */ } ::KConsumer } } fun test3b(): KFunction> { return { // BLOCK local fun KConsumer(function: Function1<@ParameterName(name = "x") String, Unit>): KConsumer { return CHECK_NOT_NULL>(arg0 = function) /*-> KConsumer */ } ::KConsumer } } typealias KCS = KConsumer typealias KR = KRunnable typealias KSS = KSupplier