[NI] Allow capturing type projections with type variables

#KT-25302 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-04-22 17:56:55 +03:00
parent abd1c3df26
commit d40313a8d7
15 changed files with 93 additions and 31 deletions
@@ -7,8 +7,8 @@ import java.util.stream.Collectors
import java.util.stream.Stream
fun test(a: Stream<String>) {
a.collect(<!NI;NEW_INFERENCE_ERROR!>Collectors.toList()<!>) checkType { _<MutableList<String>>() }
a.collect(Collectors.toList()) checkType { _<MutableList<String>>() }
// actually the inferred type is platform
a.collect(<!NI;NEW_INFERENCE_ERROR!>Collectors.toList()<!>) checkType { _<List<String?>>() }
a.collect(Collectors.toList()) checkType { _<List<String?>>() }
}