Use CompositeResolve in HierarchicalExpectActual tests
This commit is contained in:
+3
-3
@@ -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()
|
||||
}
|
||||
+2
-2
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user