[NI] Fix diagnostic reporting and unveil problem wrt captured types

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