[FE] Allow lambda argument cast to contextual functional type

This commit is contained in:
Anastasiya Shadrina
2021-09-08 20:40:14 +07:00
committed by TeamCityServer
parent d8faa9686d
commit 7fce2691e2
9 changed files with 81 additions and 9 deletions
@@ -17,7 +17,7 @@ fun File.open(): InputStream = TODO()
fun withAutoClose(block: context(AutoCloseScope) () -> Unit) {
val scope = AutoCloseScopeImpl() // Not shown here
try {
with(scope) { block() }
with(scope) { block(<!NO_VALUE_FOR_PARAMETER!>)<!> }
} finally {
scope.close()
}