Change resolution priority level for SAM adapters

After this change SAM adapters are being resolved in the same group
as members, thus their overload resolution happens simultaneously.

But in the case of overload resolution ambiguity try to filter out all
synthetic members and run the process again.

See the issue and new test for clarification

 #KT-11128 In Progress
This commit is contained in:
Denis Zharkov
2016-12-07 17:16:00 +03:00
parent a4adfb43d4
commit 891a036b59
22 changed files with 223 additions and 68 deletions
@@ -30,7 +30,7 @@ abstract class MyIt7 : Iterator<String> {
fun foo(x: Iterator<String>, y: Iterator<String?>) {
x.<!TYPE_INFERENCE_INCORPORATION_ERROR!>forEachRemaining<!>(<!NULL_FOR_NONNULL_TYPE!>null<!>)
x.forEachRemaining(<!NULL_FOR_NONNULL_TYPE!>null<!>)
x.forEachRemaining { it -> it.length }
x.forEachRemaining { it -> it<!UNNECESSARY_SAFE_CALL!>?.<!>length }