Use CompositeResolve in HierarchicalExpectActual tests

This commit is contained in:
Dmitry Savvinov
2019-06-14 16:16:16 +03:00
parent aaf76a0e46
commit 1fe8e4ba15
13 changed files with 40 additions and 19 deletions
@@ -1,6 +1,6 @@
package sample
actual class <!PACKAGE_OR_CLASSIFIER_REDECLARATION("A")!>A<!> {
actual class A {
actual fun foo(): Int = 45
fun fromBottom(): Int = 0
}
@@ -11,6 +11,6 @@ fun main() {
// Any behaviour is acceptable, as the code is erroneous.
// At the time of writing this test, we resolve to nearest A, i.e.
// 'fromBottom' is resolved, and 'fromLeft' is not.
A().fromLeft()
A().<!UNRESOLVED_REFERENCE("fromBottom")!>fromBottom<!>()
A().<!UNRESOLVED_REFERENCE("fromLeft")!>fromLeft<!>()
A().fromBottom()
}
@@ -1,5 +1,5 @@
package sample
expect class <!AMBIGUOUS_ACTUALS("Class 'A'", "left.kt, bottom.kt"), AMBIGUOUS_ACTUALS("Class 'A'", "left.kt, bottom.kt")!>A<!> {
fun <!AMBIGUOUS_ACTUALS("Function 'foo'", "left.kt, bottom.kt"), AMBIGUOUS_ACTUALS("Function 'foo'", "left.kt, bottom.kt")!>foo<!>(): Int
expect class <!AMBIGUOUS_ACTUALS("Class 'A'", "bottom.kt, left.kt")!>A<!> {
fun <!AMBIGUOUS_ACTUALS("Function 'foo'", "bottom.kt, left.kt")!>foo<!>(): Int
}