Do not consider error results successful in '::' LHS resolution

Fixes EA-81649
This commit is contained in:
Alexander Udalov
2016-04-18 14:39:35 +03:00
parent be62caf335
commit 9c99152126
4 changed files with 50 additions and 1 deletions
@@ -0,0 +1,20 @@
// Different modules are important for this test because otherwise everything is analyzed at once and some errors
// already exist in the binding context when we're analyzing "User::surname".
// (The assertion at DoubleColonExpressionResolver.checkNoExpressionOnLHS is only performed when there are no errors in the binding context)
// MODULE: m1
// FILE: bar.kt
fun <T> bar(<!UNUSED_PARAMETER!>ff<!>: <!UNRESOLVED_REFERENCE!>Err<!>.() -> Unit) {
}
// MODULE: m2(m1)
// FILE: foo.kt
data class User(val surname: String)
fun foo() {
bar<String> {
<!UNUSED_EXPRESSION!>User::surname<!>
}
}