Files
kotlin-fork/compiler/testData/diagnostics/tests/extensions/contextReceivers/genericOuterClass.kt
T
2021-12-02 20:24:16 +03:00

15 lines
249 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
context(T) class A<T>
context(Collection<P>) class B<P>
fun Int.foo() {
A<Int>()
<!NO_CONTEXT_RECEIVER!>A<String>()<!>
}
fun Collection<Int>.bar() {
B<Int>()
<!NO_CONTEXT_RECEIVER!>B<String>()<!>
}