More tests for KT-28997, fix isLocal for anonymous object in script

This commit is contained in:
Mikhail Glukhikh
2018-12-25 18:20:19 +03:00
parent 661ac711c0
commit a9147ff446
8 changed files with 41 additions and 0 deletions
@@ -0,0 +1,5 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtObjectDeclaration
// OPTIONS: usages
val x = <caret>object: Any() {
}
@@ -0,0 +1,5 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtObjectDeclaration
// OPTIONS: usages
fun foo() {
val x = <caret>object : Any() {}
}
@@ -0,0 +1 @@
@@ -0,0 +1,7 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
// OPTIONS: usages, constructorUsages
fun foo() {
class <caret>Local
val x = Local()
}
@@ -0,0 +1 @@
New instance creation 6 val x = Local()