mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
This commit adds KotlinCallHighlighterExtension for K2 call highlighter. If we register an implementation of KotlinCallHighlighterExtension interface in XML, FunctionCallHighlighter will use it instead of the default call highlighter (the default call highlighter function is FunctionCallHighlighter::getTextAttributesForCall(call: KtCall) function). GitOrigin-RevId: ba69aff2c819887bd0d3b5cac761def9301d28ab
52 lines
673 B
Kotlin
52 lines
673 B
Kotlin
// FIR_IDENTICAL
|
|
// WITH_STDLIB
|
|
// CHECK_SYMBOL_NAMES
|
|
// HIGHLIGHTER_ATTRIBUTES_KEY
|
|
fun global() {
|
|
fun inner() {
|
|
|
|
}
|
|
inner()
|
|
}
|
|
|
|
fun Int.ext() {
|
|
}
|
|
|
|
infix fun Int.fif(y: Int) {
|
|
this * y
|
|
}
|
|
|
|
open class Container {
|
|
open fun member() {
|
|
global()
|
|
5.ext()
|
|
member()
|
|
5 fif 6
|
|
}
|
|
}
|
|
|
|
fun foo() {
|
|
suspend {
|
|
|
|
}
|
|
}
|
|
|
|
annotation class MySuspend
|
|
annotation class MyDynamic
|
|
annotation class MyExtension
|
|
|
|
@MySuspend
|
|
fun suspendFunction() {
|
|
}
|
|
@MyDynamic
|
|
fun dynamicFunction() {
|
|
}
|
|
@MyExtension
|
|
fun extensionFunction() {
|
|
}
|
|
|
|
fun testFunctionsWithSpecialAnnotations() {
|
|
suspendFunction()
|
|
dynamicFunction()
|
|
extensionFunction()
|
|
} |