Files
kotlin-fork/compiler/testData/diagnostics/tests/subtyping/nestedLocalClasses.fir.kt
T
Denis.Zharkov 2ecba6ac39 Remove WITH_NEW_INFERENCE directive from all tests
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00

23 lines
350 B
Kotlin
Vendored

// !DIAGNOSTICS: -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER
package p
private fun foo(a: Int) = run {
class A {
inner class B
}
A().B()
}
private fun foo() = run {
class A {
inner class B
}
A().B()
}
fun test() {
var x = foo(1)
x = <!ASSIGNMENT_TYPE_MISMATCH!>foo()<!>
}