[Raw FIR] Synchronize enum entry building in PSI / light AST modes
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
//constructor annotation/Target(vararg annotation/AnnotationTarget)
|
||||
//│ enum class annotation/AnnotationTarget: Enum<annotation/AnnotationTarget>
|
||||
//│ │ enum entry annotation/AnnotationTarget.ANNOTATION_CLASS
|
||||
//│ │ │
|
||||
@Target(AnnotationTarget.ANNOTATION_CLASS) annotation class base
|
||||
|
||||
//constructor base()
|
||||
//│
|
||||
@base annotation class derived
|
||||
|
||||
//constructor base() constructor base()
|
||||
//│ │
|
||||
@base class correct(@base val x: Int) {
|
||||
// constructor base() Int
|
||||
// │ │
|
||||
@base constructor(): this(0)
|
||||
}
|
||||
|
||||
//constructor base()
|
||||
//│
|
||||
@base enum class My {
|
||||
// constructor base()
|
||||
// │
|
||||
@base FIRST,
|
||||
// constructor base()
|
||||
// │
|
||||
@base SECOND
|
||||
}
|
||||
|
||||
//constructor base()
|
||||
//│ constructor base()
|
||||
//│ │ constructor base()
|
||||
//│ │ │
|
||||
@base fun foo(@base y: @base Int): Int {
|
||||
// constructor base()
|
||||
// │ constructor base()
|
||||
// │ │ constructor base()
|
||||
// │ │ │ Int
|
||||
// │ │ │ │ foo.bar.z: Int
|
||||
// │ │ │ │ │ fun (Int).plus(Int): Int
|
||||
// │ │ │ │ │ │ Int
|
||||
// │ │ │ │ │ │ │
|
||||
@base fun bar(@base z: @base Int) = z + 1
|
||||
// constructor base()
|
||||
// │ fun foo.bar(Int): Int
|
||||
// │ Int │ foo.y: Int
|
||||
// │ │ │ │
|
||||
@base val local = bar(y)
|
||||
// val foo.local: Int
|
||||
// │
|
||||
return local
|
||||
}
|
||||
|
||||
//constructor base()
|
||||
//│ Int Int
|
||||
//│ │ │
|
||||
@base val z = 0
|
||||
@@ -0,0 +1,24 @@
|
||||
object A {
|
||||
constructor()
|
||||
init {}
|
||||
}
|
||||
|
||||
enum class B {
|
||||
// constructor B()
|
||||
// │
|
||||
X() {
|
||||
constructor()
|
||||
}
|
||||
}
|
||||
|
||||
class C {
|
||||
companion object {
|
||||
constructor()
|
||||
}
|
||||
}
|
||||
|
||||
// Any
|
||||
// │
|
||||
val anonObject = object {
|
||||
constructor()
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// T fun (() -> T).invoke(): T
|
||||
// │ │
|
||||
fun <T> run(block: () -> T): T = block()
|
||||
|
||||
fun test_1() {
|
||||
// fun <T> run<Unit>(() -> Unit): Unit
|
||||
// │
|
||||
run { return@run }
|
||||
// fun <T> run<???>(() -> ???): ???
|
||||
// │
|
||||
run { return }
|
||||
}
|
||||
|
||||
fun test_2() {
|
||||
// fun <T> run<Int>(() -> Int): Int
|
||||
// │ Int
|
||||
// │ │
|
||||
run(fun (): Int { return 1 })
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun test() {
|
||||
// class Array<T>: Any, Cloneable, java/io/Serializable
|
||||
// │
|
||||
Array<String>::class
|
||||
}
|
||||
Reference in New Issue
Block a user