mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
So far, we ran smoke tests for compose checker on Android Studio, but now the compose compiler plugin is a part the upstream KT compiler, and we enabled it for the upstream IntelliJ as well. This commit adds similar smoke tests to IntelliJ. Since we will work on the compose support for KMP, I believe this new smock test helps us to detect some issues of enabling the compose compiler plugin checker. ^KTIJ-30601 GitOrigin-RevId: 6c461ac9435d180b5cdda2529a400a0da4b8aa6c
33 lines
2.2 KiB
Plaintext
33 lines
2.2 KiB
Plaintext
// COMPILER_ARGUMENTS: -Xplugin=$TEST_DIR$/compose_fake_plugin.jar
|
|
// FILE: main.kt
|
|
// ALLOW_ERRORS
|
|
import androidx.compose.runtime.Composable
|
|
|
|
interface Foo {
|
|
@Composable
|
|
fun composableFunction(param: Boolean): Boolean
|
|
fun nonComposableFunction(param: Boolean): Boolean
|
|
val nonComposableProperty: Boolean
|
|
}
|
|
|
|
object FakeFoo : Foo {
|
|
<!HIGHLIGHTING("severity='ERROR'; descr='[CONFLICTING_OVERLOADS] Conflicting overloads: fun composableFunction(param: Boolean): Boolean fun composableFunction(param: Boolean): Boolean'")!>override fun composableFunction(param: Boolean)<!> = true
|
|
<!HIGHLIGHTING("severity='ERROR'; descr='[CONFLICTING_OVERLOADS] Conflicting overloads: fun nonComposableFunction(param: Boolean): Boolean fun nonComposableFunction(param: Boolean): Boolean'")!>@Composable override fun nonComposableFunction(param: Boolean)<!> = true
|
|
override val nonComposableProperty: Boolean <!HIGHLIGHTING("severity='ERROR'; descr='[CONFLICTING_OVERLOADS] Conflicting overloads: get(): Boolean get(): Boolean'")!>@Composable get()<!> = true
|
|
}
|
|
|
|
interface Bar {
|
|
@Composable
|
|
fun composableFunction(param: Boolean): Boolean
|
|
@get:Composable val composableProperty: Boolean
|
|
fun nonComposableFunction(param: Boolean): Boolean
|
|
val nonComposableProperty: Boolean
|
|
}
|
|
|
|
object FakeBar : Bar {
|
|
<!HIGHLIGHTING("severity='ERROR'; descr='[CONFLICTING_OVERLOADS] Conflicting overloads: fun composableFunction(param: Boolean): Boolean fun composableFunction(param: Boolean): Boolean'")!>override fun composableFunction(param: Boolean)<!> = true
|
|
<!HIGHLIGHTING("severity='ERROR'; descr='[CONFLICTING_OVERLOADS] Conflicting overloads: get(): Boolean get(): Boolean'")!>override val composableProperty: Boolean<!> = true
|
|
<!HIGHLIGHTING("severity='ERROR'; descr='[CONFLICTING_OVERLOADS] Conflicting overloads: fun nonComposableFunction(param: Boolean): Boolean fun nonComposableFunction(param: Boolean): Boolean'")!>@Composable override fun nonComposableFunction(param: Boolean)<!> = true
|
|
override val nonComposableProperty: Boolean <!HIGHLIGHTING("severity='ERROR'; descr='[CONFLICTING_OVERLOADS] Conflicting overloads: get(): Boolean get(): Boolean'")!>@Composable get()<!> = true
|
|
}
|