FIR: Fix overload resolution for some invoke cases

Namely, it's about the cases when there are multiple variable candidates
with the same priority and all of them should be collected and compared
This commit is contained in:
Denis Zharkov
2020-04-01 17:56:13 +03:00
parent bcd79c1e2e
commit 6cc6b9efcb
13 changed files with 163 additions and 21 deletions
@@ -29,6 +29,6 @@ class E {
}
fun main() {
E.f() // Resolves to (2) in old FE (to (1) in FIR with object implicit invoke support)
E.<!AMBIGUITY!>f<!>() // Resolves to (2) in old FE (ambiguity in FIR)
E.f.invoke() // Resolves to (1)
}
}
@@ -74,6 +74,6 @@ FILE: invokePriority.kt
}
public final fun main(): R|kotlin/Unit| {
Q|E|.R|/E.Companion.f|.R|/E.f.invoke|()
Q|E|.<Ambiguity: f, [/E.f.invoke, kotlin/Function0.invoke]>#()
Q|E.f|.R|/E.f.invoke|()
}