Don't highlight entire complex callee expression as call

If an expression returns something that has invoke() defined on it,
this entire expression can act as a callee. If we highlight it, this
will suppress more useful highlighting such as string literals.

 #KT-16159 Fixed
This commit is contained in:
Dmitry Jemerov
2017-05-09 11:04:59 +02:00
parent 5d9307024a
commit d1893cfa5f
4 changed files with 16 additions and 2 deletions
+8
View File
@@ -0,0 +1,8 @@
fun <info textAttributesKey="KOTLIN_FUNCTION_DECLARATION">test</info>() {
<info textAttributesKey="KOTLIN_CONSTRUCTOR">Test</info>("text", "text")() // BUG
}
class <info textAttributesKey="KOTLIN_CLASS">Test</info>(val <info textAttributesKey="KOTLIN_INSTANCE_PROPERTY">x</info>: <info textAttributesKey="KOTLIN_CLASS">String</info>, val <info textAttributesKey="KOTLIN_INSTANCE_PROPERTY">y</info>: <info textAttributesKey="KOTLIN_CLASS">String</info>) {
<info textAttributesKey="KOTLIN_BUILTIN_ANNOTATION">operator</info> fun <info textAttributesKey="KOTLIN_FUNCTION_DECLARATION">invoke</info>() {
}
}