diff --git a/compiler/testData/diagnostics/tests/inference/nothingType/implicitInferenceTToFlexibleNothing.fir.kt b/compiler/testData/diagnostics/tests/inference/nothingType/implicitInferenceTToFlexibleNothing.fir.kt new file mode 100644 index 00000000000..61352d7e646 --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/nothingType/implicitInferenceTToFlexibleNothing.fir.kt @@ -0,0 +1,11 @@ +// !DIAGNOSTICS: -UNUSED_VARIABLE -UNCHECKED_CAST -UNUSED_PARAMETER +// !LANGUAGE: +NewInference +// SKIP_TXT + +import java.util.* + +fun foo (f: () -> List): T = null as T + +fun main() { + val x = foo { Collections.emptyList() } +}