Introduce inapplicable wrong receiver status to improve diagnostics

#KT-10754 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-07-10 05:19:19 +03:00
parent 79ee8f452c
commit 178bb900b4
7 changed files with 34 additions and 8 deletions
@@ -8,9 +8,8 @@ open class B {}
fun test(a: A, b: B) {
with (a) {
with (b) {
// candidates with errors for receiver b going before candidates with errors for receiver a
// resolved to Int.foo with error: UNRESOLVED_REFERENCE_WRONG_RECEIVER
`!`foo(1.0)
// resolved to A.foo with error: CONSTANT_EXPECTED_TYPE_MISMATCH
foo(1.0)
}
}
}