KT-38027 Support Code Vision feature in Kotlin

This commit is contained in:
Andrei Klunnyi
2020-04-30 11:58:50 +02:00
parent 4c8f9e4e06
commit b08f501aac
30 changed files with 2531 additions and 3 deletions
@@ -0,0 +1,18 @@
// MODE: usages-&-inheritors
// USAGES-LIMIT: 3
// INHERITORS-LIMIT: 2
<# block [ 3+ Usages 2+ Inheritors] #>
open class SomeClass {
class NestedDerivedClass: SomeClass() {} // <== (1): nested class
}
<# block [ 1 Usage 1 Inheritor] #>
open class DerivedClass : SomeClass {} // <== (2): direct derived one
class AnotherDerivedClass : SomeClass {} // <== (3): yet another derived one
class DerivedDerivedClass : DerivedClass { // <== (): indirect inheritor of SomeClass
fun main() {
val someClassInstance = object : SomeClass() // { <== (4): anonymous derived one
val somethingHere = ""
}
}
}