Navigation: Support NEW_AS_CONSTRUCTOR flag for constructor calls

#KT-15398 Fixed
 #KT-15536 Fixed
This commit is contained in:
Alexey Sedunov
2017-03-01 15:26:42 +03:00
parent 5e8cd654ec
commit eb9c775476
8 changed files with 60 additions and 5 deletions
@@ -0,0 +1,8 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
// OPTIONS: usages, constructorUsages
annotation class MyAnnotation()
@<caret>MyAnnotation
fun test() {
MyAnnotation::class.java
}
@@ -0,0 +1,2 @@
Annotation 5 @MyAnnotation
Unclassified usage 7 MyAnnotation::class.java
@@ -0,0 +1,7 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
// OPTIONS: usages, constructorUsages
fun test() {
val kk: KK = <caret>KK()
}
class KK()
@@ -0,0 +1,2 @@
Local variable declaration 4 val kk: KK = KK()
New instance creation 4 val kk: KK = KK()
@@ -0,0 +1,9 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
// OPTIONS: usages, constructorUsages
fun test() {
val kk: KK = <caret>KK()
}
class KK {
constructor()
}
@@ -0,0 +1,2 @@
Local variable declaration 4 val kk: KK = KK()
New instance creation 4 val kk: KK = KK()