Added test checking names highlighting.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
fun <info textAttributesKey="KOTLIN_FUNCTION_DECLARATION">global</info>() {
|
||||
fun <info textAttributesKey="KOTLIN_FUNCTION_DECLARATION">inner</info>() {
|
||||
|
||||
}
|
||||
<info textAttributesKey="KOTLIN_FUNCTION_CALL">inner</info>()
|
||||
}
|
||||
|
||||
fun Int.<info textAttributesKey="KOTLIN_FUNCTION_DECLARATION">ext</info>() {
|
||||
}
|
||||
|
||||
<info textAttributesKey="KOTLIN_KEYWORD">open</info> class <info textAttributesKey="KOTLIN_CLASS">Container</info> {
|
||||
<info textAttributesKey="KOTLIN_KEYWORD">open</info> fun <info textAttributesKey="KOTLIN_FUNCTION_DECLARATION">member</info>() {
|
||||
<info textAttributesKey="KOTLIN_NAMESPACE_FUNCTION_CALL">global</info>()
|
||||
5.<info textAttributesKey="KOTLIN_EXTENSION_FUNCTION_CALL">ext</info>()
|
||||
<info textAttributesKey="KOTLIN_FUNCTION_CALL">member</info>()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
trait <info textAttributesKey="KOTLIN_TRAIT">TheTrait</info> {
|
||||
}
|
||||
|
||||
class <info textAttributesKey="KOTLIN_CLASS">TheClass</info> : <info textAttributesKey="KOTLIN_TRAIT">TheTrait</info> {
|
||||
}
|
||||
|
||||
<info textAttributesKey="KOTLIN_KEYWORD">annotation</info> class <info textAttributesKey="KOTLIN_ANNOTATION">magnificent</info>
|
||||
<info textAttributesKey="KOTLIN_KEYWORD">annotation</info> class <info textAttributesKey="KOTLIN_ANNOTATION">deprecated</info>
|
||||
|
||||
[<info textAttributesKey="KOTLIN_ANNOTATION">deprecated</info>]
|
||||
<info textAttributesKey="KOTLIN_ANNOTATION">magnificent</info> <info textAttributesKey="KOTLIN_KEYWORD">abstract</info> class <info textAttributesKey="KOTLIN_ABSTRACT_CLASS">AbstractClass</info><<info textAttributesKey="KOTLIN_TYPE_PARAMETER">T</info>> {
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
var <info textAttributesKey="KOTLIN_MUTABLE_VARIABLE"><info textAttributesKey="KOTLIN_PROPERTY_WITH_BACKING_FIELD"><info textAttributesKey="KOTLIN_NAMESPACE_PROPERTY">x</info></info></info> = 5
|
||||
|
||||
val Int.<info textAttributesKey="KOTLIN_EXTENSION_PROPERTY">sq</info> : Int
|
||||
<info textAttributesKey="KOTLIN_KEYWORD">get</info>() {
|
||||
return this * this
|
||||
}
|
||||
|
||||
val <info textAttributesKey="KOTLIN_NAMESPACE_PROPERTY"><info textAttributesKey="KOTLIN_PROPERTY_WITH_BACKING_FIELD">y</info></info> : Int = 1
|
||||
<info textAttributesKey="KOTLIN_KEYWORD">get</info>() {
|
||||
return 5.<info textAttributesKey="KOTLIN_EXTENSION_PROPERTY">sq</info> + <info textAttributesKey="KOTLIN_NAMESPACE_PROPERTY"><info textAttributesKey="KOTLIN_BACKING_FIELD_ACCESS">$y</info></info> + <info textAttributesKey="KOTLIN_MUTABLE_VARIABLE"><info textAttributesKey="KOTLIN_NAMESPACE_PROPERTY">x</info></info>
|
||||
}
|
||||
|
||||
class <info textAttributesKey="KOTLIN_CLASS">Foo</info>(val <info textAttributesKey="KOTLIN_PARAMETER"><info textAttributesKey="KOTLIN_INSTANCE_PROPERTY"><info textAttributesKey="KOTLIN_PROPERTY_WITH_BACKING_FIELD">a</info></info></info> : Int, <info textAttributesKey="KOTLIN_PARAMETER">b</info> : String) {
|
||||
{
|
||||
<info textAttributesKey="KOTLIN_PARAMETER">b</info>
|
||||
}
|
||||
|
||||
var <info textAttributesKey="KOTLIN_MUTABLE_VARIABLE"><info textAttributesKey="KOTLIN_INSTANCE_PROPERTY">v</info></info> : Int
|
||||
<info textAttributesKey="KOTLIN_KEYWORD">get</info>() {
|
||||
return 1;
|
||||
}
|
||||
<info textAttributesKey="KOTLIN_KEYWORD">set</info>(<info textAttributesKey="KOTLIN_PARAMETER">value</info>) {
|
||||
<info textAttributesKey="KOTLIN_PARAMETER">value</info>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
var <info textAttributesKey="KOTLIN_NAMESPACE_PROPERTY"><info textAttributesKey="KOTLIN_PROPERTY_WITH_BACKING_FIELD"><info textAttributesKey="KOTLIN_MUTABLE_VARIABLE">global</info></info></info> : () -> Unit = {}
|
||||
|
||||
val Int.<info textAttributesKey="KOTLIN_EXTENSION_PROPERTY">ext</info> : () -> Unit
|
||||
<info textAttributesKey="KOTLIN_KEYWORD">get</info>() {
|
||||
return {}
|
||||
}
|
||||
|
||||
fun <info textAttributesKey="KOTLIN_FUNCTION_DECLARATION">foo</info>(<info textAttributesKey="KOTLIN_PARAMETER">a</info> : () -> Unit) {
|
||||
<info textAttributesKey="KOTLIN_PARAMETER">a</info>()
|
||||
<info textAttributesKey="KOTLIN_NAMESPACE_PROPERTY"><info textAttributesKey="KOTLIN_MUTABLE_VARIABLE">global</info></info>()
|
||||
// TODO uncomment next line and replace "[" with "<" when KT-1728 is fixed
|
||||
// 1.[info textAttributesKey="KOTLIN_EXTENSION_PROPERTY">ext</info>()
|
||||
}
|
||||
Reference in New Issue
Block a user