KT-21928 Structure view doesn't show default constructor
This commit is contained in:
committed by
Nikolay Krasko
parent
3178dee759
commit
9fad40b586
+4
-1
@@ -126,5 +126,8 @@ private class AssignableLazyProperty<in R, T : Any>(val init: () -> T) : ReadWri
|
||||
}
|
||||
}
|
||||
|
||||
fun KtClassOrObject.getStructureDeclarations() = primaryConstructorParameters.filter { it.hasValOrVar() } + declarations
|
||||
fun KtClassOrObject.getStructureDeclarations() =
|
||||
(primaryConstructor?.let { listOf(it) } ?: emptyList()) +
|
||||
primaryConstructorParameters.filter { it.hasValOrVar() } +
|
||||
declarations
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
-InheritedJavaMembers.kt
|
||||
-InheritedJavaMembers
|
||||
call(): String! location=→Callable
|
||||
constructor InheritedJavaMembers()
|
||||
equals(Any?): Boolean location=→Any
|
||||
hashCode(): Int location=→Any
|
||||
test(): Unit
|
||||
|
||||
+2
-1
@@ -3,4 +3,5 @@
|
||||
a: Int location=→TestData
|
||||
field: Int
|
||||
some(): Unit location=→TestData
|
||||
TestData
|
||||
-TestData
|
||||
constructor TestData(Int)
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
-A2
|
||||
a: Int
|
||||
b: [ERROR : Annotation is absent]
|
||||
constructor A2(Int, [ERROR : Type annotation was missing for parameter b] = ...)
|
||||
-A3
|
||||
a: Int
|
||||
b: String
|
||||
constructor A3(Int)
|
||||
-A4
|
||||
constructor A4(T?)
|
||||
t: T?
|
||||
-A5
|
||||
Inner1
|
||||
@@ -39,3 +42,4 @@
|
||||
withDefaulArgs(Int = ..., String = ...): Unit
|
||||
-WithDefaultArgs
|
||||
a: Int
|
||||
constructor WithDefaultArgs(Int = ..., String = ...)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
-Simple.kt
|
||||
-Test
|
||||
constructor Test(String)
|
||||
foo(): Int
|
||||
other(): Unit
|
||||
some: Int
|
||||
|
||||
Reference in New Issue
Block a user