[NI] Finish analysis for coerced last lambda expressions if needed

This commit is contained in:
Mikhail Zarechenskiy
2020-02-11 09:02:31 +03:00
parent 220bf6d62f
commit 4542f3b720
34 changed files with 145 additions and 55 deletions
@@ -6,12 +6,12 @@ class A<T> {
class Out<out E>
fun test(x: A<out CharSequence>, y: Out<CharSequence>) {
<!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>with<!>(x) {
with(x) {
// TODO: this diagnostic could be replaced with TYPE_MISMATCH_DUE_TO_TYPE_PROJECTION
"".<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!>()
<!OI;TYPE_MISMATCH_DUE_TO_TYPE_PROJECTIONS!>y<!>.<!NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>bar<!>()
<!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>with<!>(y) {
with(y) {
<!NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;TYPE_MISMATCH_DUE_TO_TYPE_PROJECTIONS!>bar<!>()
}
}