Files
kotlin-fork/compiler/testData/diagnostics/tests/extensions/contextReceivers/priorityInTower.kt
T
Mikhail Glukhikh 6ed7c041b4 K1/K2: add various tests for context receiver tower resolve priority
Related to KT-64531, KT-64488
#KT-64531 As Designed
2024-02-14 09:55:51 +00:00

48 lines
555 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// ISSUE: KT-64531, KT-64488
// FIR_DUMP
// WITH_STDLIB
// FILE: a.kt
package a
val y: Int = 0
// FILE: b.kt
package b
val z: Int = 0
// FILE: c.kt
package c
import a.y
import b.*
import c.Foo.*
val x: Int = 0
enum class Foo { A, B, C }
class Bar(val x: String, val y: String, val z: String, val w: String, val entries: String)
class Baz(val w: Int)
context(Bar)
fun test1() = x
context(Bar)
fun test2() = y
context(Bar)
fun test3() = z
context(Bar)
fun test4() = entries
context(Bar)
fun Baz.test5() = w