FIR: Fix capturing of flexible types

This commit is contained in:
Denis Zharkov
2020-01-29 15:30:17 +03:00
parent ac2b5beb4e
commit d28e1f156a
7 changed files with 29 additions and 9 deletions
@@ -7,8 +7,8 @@ import java.util.stream.Collectors
import java.util.stream.Stream
fun test(a: Stream<String>) {
a.<!INAPPLICABLE_CANDIDATE!>collect<!>(Collectors.toList()) <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><MutableList<String>>() }
a.collect(Collectors.toList()) checkType { <!UNRESOLVED_REFERENCE!>_<!><MutableList<String>>() }
// actually the inferred type is platform
a.<!INAPPLICABLE_CANDIDATE!>collect<!>(Collectors.toList()) <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><List<String?>>() }
a.collect(Collectors.toList()) checkType { <!UNRESOLVED_REFERENCE!>_<!><List<String?>>() }
}