Add test for obsolete issue

#KT-8262 Obsolete
This commit is contained in:
Mikhail Zarechenskiy
2017-06-20 15:36:08 +03:00
parent 4b3ffd9418
commit 16de991b07
2 changed files with 13 additions and 0 deletions
@@ -0,0 +1,7 @@
val f = listOf("").<error descr="[TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR] Type inference failed: fun <T> Iterable<T>.firstOrNull(predicate: (T) -> Boolean): T?
cannot be applied to
receiver: List<String> arguments: (Int)
">firstOrNull</error>(<error descr="[CONSTANT_EXPECTED_TYPE_MISMATCH] The integer literal does not conform to the expected type (String) -> Boolean">1</error>)
fun <T> listOf(element: T): List<T> = java.util.Collections.singletonList(element)
fun <T> Iterable<T>.firstOrNull(<warning>predicate</warning>: (T) -> Boolean): T? = null