mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
17 lines
249 B
Kotlin
Vendored
17 lines
249 B
Kotlin
Vendored
// !CHECK_TYPE
|
|
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
|
|
|
|
|
class A
|
|
|
|
fun A.foo() = this
|
|
|
|
fun test(a: A) {
|
|
fun A.foo() = 3
|
|
|
|
a.foo() checkType { _<Int>() }
|
|
with(a) {
|
|
foo() checkType { _<Int>() }
|
|
}
|
|
}
|