diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/delegatedExpressionWithLabeledReturnInsideLambda.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/delegatedExpressionWithLabeledReturnInsideLambda.fir.kt new file mode 100644 index 00000000000..13953b3e5b5 --- /dev/null +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/delegatedExpressionWithLabeledReturnInsideLambda.fir.kt @@ -0,0 +1,14 @@ +// !LANGUAGE: +NewInference +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE + +class Delegate + +operator fun Delegate.getValue(thisRef: Any?, property: kotlin.reflect.KProperty<*>): T = TODO() + +fun createDelegate(f: () -> K): Delegate = TODO() + +fun test() { + val bar: () -> String by createDelegate { + return@createDelegate { "str" } + } +}