Implement stub building for inner types
This commit is contained in:
@@ -16,8 +16,9 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.descriptors
|
package org.jetbrains.kotlin.descriptors
|
||||||
|
|
||||||
import org.jetbrains.kotlin.types.KotlinType
|
import org.jetbrains.kotlin.types.*
|
||||||
import org.jetbrains.kotlin.types.TypeProjection
|
import org.jetbrains.kotlin.types.error.MissingDependencyErrorClass
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
fun ClassDescriptor.computeConstructorTypeParameters(): List<TypeParameterDescriptor> {
|
fun ClassDescriptor.computeConstructorTypeParameters(): List<TypeParameterDescriptor> {
|
||||||
val declaredParameters = declaredTypeParameters
|
val declaredParameters = declaredTypeParameters
|
||||||
@@ -55,8 +56,13 @@ class PossiblyInnerType(
|
|||||||
fun segments(): List<PossiblyInnerType> = outerType?.segments().orEmpty() + this
|
fun segments(): List<PossiblyInnerType> = outerType?.segments().orEmpty() + this
|
||||||
}
|
}
|
||||||
|
|
||||||
fun KotlinType.buildPossiblyInnerType(): PossiblyInnerType?
|
fun KotlinType.buildPossiblyInnerType(): PossiblyInnerType? {
|
||||||
= buildPossiblyInnerType(constructor.declarationDescriptor as? ClassDescriptor, 0)
|
if (constructor.declarationDescriptor is MissingDependencyErrorClass) {
|
||||||
|
return getCapability<PossiblyInnerTypeCapability>()?.possiblyInnerType
|
||||||
|
}
|
||||||
|
|
||||||
|
return buildPossiblyInnerType(constructor.declarationDescriptor as? ClassDescriptor, 0)
|
||||||
|
}
|
||||||
|
|
||||||
private fun KotlinType.buildPossiblyInnerType(classDescriptor: ClassDescriptor?, index: Int): PossiblyInnerType? {
|
private fun KotlinType.buildPossiblyInnerType(classDescriptor: ClassDescriptor?, index: Int): PossiblyInnerType? {
|
||||||
if (classDescriptor == null) return null
|
if (classDescriptor == null) return null
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.types
|
package org.jetbrains.kotlin.types
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.descriptors.PossiblyInnerType
|
||||||
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
|
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
|
||||||
|
|
||||||
public interface TypeCapability
|
public interface TypeCapability
|
||||||
@@ -28,6 +29,18 @@ public interface TypeCapabilities {
|
|||||||
fun <T : TypeCapability> getCapability(capabilityClass: Class<T>): T?
|
fun <T : TypeCapability> getCapability(capabilityClass: Class<T>): T?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class CompositeTypeCapabilities(private val first: TypeCapabilities, private val second: TypeCapabilities) : TypeCapabilities {
|
||||||
|
override fun <T : TypeCapability> getCapability(capabilityClass: Class<T>): T? =
|
||||||
|
first.getCapability(capabilityClass) ?: second.getCapability(capabilityClass)
|
||||||
|
}
|
||||||
|
|
||||||
|
class SingletonTypeCapabilities(private val clazz: Class<*>, private val typeCapability: TypeCapability) : TypeCapabilities {
|
||||||
|
override fun <T : TypeCapability> getCapability(capabilityClass: Class<T>): T? {
|
||||||
|
if (capabilityClass == clazz) return typeCapability as T
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public inline fun <reified T : TypeCapability> KotlinType.getCapability(): T? = getCapability(javaClass<T>())
|
public inline fun <reified T : TypeCapability> KotlinType.getCapability(): T? = getCapability(javaClass<T>())
|
||||||
|
|
||||||
public interface Specificity : TypeCapability {
|
public interface Specificity : TypeCapability {
|
||||||
@@ -88,3 +101,7 @@ public fun sameTypeConstructors(first: KotlinType, second: KotlinType): Boolean
|
|||||||
interface CustomSubstitutionCapability : TypeCapability {
|
interface CustomSubstitutionCapability : TypeCapability {
|
||||||
public val substitution: TypeSubstitution
|
public val substitution: TypeSubstitution
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface PossiblyInnerTypeCapability : TypeCapability {
|
||||||
|
public val possiblyInnerType: PossiblyInnerType?
|
||||||
|
}
|
||||||
|
|||||||
+30
-1
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.serialization.deserialization
|
package org.jetbrains.kotlin.serialization.deserialization
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||||
|
import org.jetbrains.kotlin.descriptors.PossiblyInnerType
|
||||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationWithTarget
|
import org.jetbrains.kotlin.descriptors.annotations.AnnotationWithTarget
|
||||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||||
import org.jetbrains.kotlin.serialization.ProtoBuf
|
import org.jetbrains.kotlin.serialization.ProtoBuf
|
||||||
@@ -58,7 +60,34 @@ class DeserializedType(
|
|||||||
|
|
||||||
override fun getAnnotations(): Annotations = annotations
|
override fun getAnnotations(): Annotations = annotations
|
||||||
|
|
||||||
override fun getCapabilities() = c.components.typeCapabilitiesLoader.loadCapabilities(typeProto)
|
override fun getCapabilities() = typeCapabilities()
|
||||||
|
|
||||||
|
private val typeCapabilities = c.storageManager.createLazyValue { computeCapabilities() }
|
||||||
|
|
||||||
|
private fun computeCapabilities(): TypeCapabilities {
|
||||||
|
val capabilities = c.components.typeCapabilitiesLoader.loadCapabilities(typeProto)
|
||||||
|
|
||||||
|
return computePossiblyInnerType()?.let { it: PossiblyInnerType ->
|
||||||
|
CompositeTypeCapabilities(
|
||||||
|
SingletonTypeCapabilities(
|
||||||
|
PossiblyInnerTypeCapability::class.java,
|
||||||
|
PossiblyInnerTypeCapabilityImpl(it)),
|
||||||
|
capabilities)
|
||||||
|
} ?: capabilities
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun computePossiblyInnerType(): PossiblyInnerType? {
|
||||||
|
if (!typeProto.hasClassName()) return null
|
||||||
|
|
||||||
|
val outerType = typeProto.outerType(c.typeTable)?.let { DeserializedType(c, it).computePossiblyInnerType() }
|
||||||
|
|
||||||
|
return PossiblyInnerType(
|
||||||
|
constructor.declarationDescriptor as ClassDescriptor,
|
||||||
|
typeProto.argumentList.deserialize(),
|
||||||
|
outerType)
|
||||||
|
}
|
||||||
|
|
||||||
|
private class PossiblyInnerTypeCapabilityImpl(override val possiblyInnerType: PossiblyInnerType?) : PossiblyInnerTypeCapability
|
||||||
|
|
||||||
fun getPresentableText(): String = typeDeserializer.presentableTextForErrorType(typeProto)
|
fun getPresentableText(): String = typeDeserializer.presentableTextForErrorType(typeProto)
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-7
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.idea.decompiler.stubBuilder
|
|||||||
import com.google.protobuf.MessageLite
|
import com.google.protobuf.MessageLite
|
||||||
import com.intellij.psi.PsiElement
|
import com.intellij.psi.PsiElement
|
||||||
import com.intellij.psi.stubs.StubElement
|
import com.intellij.psi.stubs.StubElement
|
||||||
|
import com.intellij.util.SmartList
|
||||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||||
import org.jetbrains.kotlin.lexer.KtModifierKeywordToken
|
import org.jetbrains.kotlin.lexer.KtModifierKeywordToken
|
||||||
import org.jetbrains.kotlin.lexer.KtTokens
|
import org.jetbrains.kotlin.lexer.KtTokens
|
||||||
@@ -35,10 +36,7 @@ import org.jetbrains.kotlin.serialization.ProtoBuf
|
|||||||
import org.jetbrains.kotlin.serialization.ProtoBuf.Type
|
import org.jetbrains.kotlin.serialization.ProtoBuf.Type
|
||||||
import org.jetbrains.kotlin.serialization.ProtoBuf.Type.Argument.Projection
|
import org.jetbrains.kotlin.serialization.ProtoBuf.Type.Argument.Projection
|
||||||
import org.jetbrains.kotlin.serialization.ProtoBuf.TypeParameter.Variance
|
import org.jetbrains.kotlin.serialization.ProtoBuf.TypeParameter.Variance
|
||||||
import org.jetbrains.kotlin.serialization.deserialization.ProtoContainer
|
import org.jetbrains.kotlin.serialization.deserialization.*
|
||||||
import org.jetbrains.kotlin.serialization.deserialization.type
|
|
||||||
import org.jetbrains.kotlin.serialization.deserialization.upperBounds
|
|
||||||
import org.jetbrains.kotlin.serialization.deserialization.varargElementType
|
|
||||||
import org.jetbrains.kotlin.types.DynamicTypeCapabilities
|
import org.jetbrains.kotlin.types.DynamicTypeCapabilities
|
||||||
import org.jetbrains.kotlin.utils.addToStdlib.singletonOrEmptyList
|
import org.jetbrains.kotlin.utils.addToStdlib.singletonOrEmptyList
|
||||||
import java.util.*
|
import java.util.*
|
||||||
@@ -88,9 +86,12 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
createTypeAnnotationStubs(parent, annotations)
|
createTypeAnnotationStubs(parent, annotations)
|
||||||
val typeStub = createStubForTypeName(classId, parent)
|
val outerTypeChain = sequence(type) { it.outerType(c.typeTable) }.toList()
|
||||||
val typeArgumentProtoList = type.getArgumentList()
|
|
||||||
createTypeArgumentListStub(typeStub, typeArgumentProtoList)
|
createStubForTypeName(classId, parent) {
|
||||||
|
userTypeStub, index ->
|
||||||
|
outerTypeChain.getOrNull(index)?.let { createTypeArgumentListStub(userTypeStub, it.argumentList) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createTypeAnnotationStubs(parent: KotlinStubBaseImpl<*>, annotations: List<ClassId>) {
|
private fun createTypeAnnotationStubs(parent: KotlinStubBaseImpl<*>, annotations: List<ClassId>) {
|
||||||
|
|||||||
+12
-8
@@ -127,25 +127,29 @@ fun createStubForPackageName(packageDirectiveStub: KotlinPlaceHolderStubImpl<KtP
|
|||||||
recCreateStubForPackageName(packageDirectiveStub)
|
recCreateStubForPackageName(packageDirectiveStub)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun createStubForTypeName(typeClassId: ClassId, parent: StubElement<out PsiElement>): KotlinUserTypeStub {
|
fun createStubForTypeName(
|
||||||
|
typeClassId: ClassId,
|
||||||
|
parent: StubElement<out PsiElement>,
|
||||||
|
onUserTypeLevel: (KotlinUserTypeStub, Int) -> Unit = { x, y -> }
|
||||||
|
): KotlinUserTypeStub {
|
||||||
val fqName =
|
val fqName =
|
||||||
if (typeClassId.isLocal()) KotlinBuiltIns.FQ_NAMES.any
|
if (typeClassId.isLocal()) KotlinBuiltIns.FQ_NAMES.any
|
||||||
else typeClassId.asSingleFqName().toUnsafe()
|
else typeClassId.asSingleFqName().toUnsafe()
|
||||||
val segments = fqName.pathSegments().toArrayList()
|
val segments = fqName.pathSegments().asReversed()
|
||||||
assert(segments.isNotEmpty())
|
assert(segments.isNotEmpty())
|
||||||
val iterator = segments.listIterator(segments.size)
|
|
||||||
|
|
||||||
fun recCreateStubForType(current: StubElement<out PsiElement>): KotlinUserTypeStub {
|
fun recCreateStubForType(current: StubElement<out PsiElement>, level: Int): KotlinUserTypeStub {
|
||||||
val lastSegment = iterator.previous()
|
val lastSegment = segments[level]
|
||||||
val userTypeStub = KotlinUserTypeStubImpl(current, isAbsoluteInRootPackage = false)
|
val userTypeStub = KotlinUserTypeStubImpl(current, isAbsoluteInRootPackage = false)
|
||||||
if (iterator.hasPrevious()) {
|
if (level + 1 < segments.size) {
|
||||||
recCreateStubForType(userTypeStub)
|
recCreateStubForType(userTypeStub, level + 1)
|
||||||
}
|
}
|
||||||
KotlinNameReferenceExpressionStubImpl(userTypeStub, lastSegment.ref())
|
KotlinNameReferenceExpressionStubImpl(userTypeStub, lastSegment.ref())
|
||||||
|
onUserTypeLevel(userTypeStub, level)
|
||||||
return userTypeStub
|
return userTypeStub
|
||||||
}
|
}
|
||||||
|
|
||||||
return recCreateStubForType(parent)
|
return recCreateStubForType(parent, level = 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class FlagsToModifiers {
|
enum class FlagsToModifiers {
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
// IntelliJ API Decompiler stub source generated from a class file
|
||||||
|
// Implementation of methods is not available
|
||||||
|
|
||||||
|
package test
|
||||||
|
|
||||||
|
public final class InnerClasses<E, F> public constructor() {
|
||||||
|
public final fun bar(x: test.InnerClasses<kotlin.String, kotlin.Double>.Inner2, y: test.InnerClasses<E, F>.Inner2): kotlin.Unit { /* compiled code */ }
|
||||||
|
|
||||||
|
public final inner class Inner<G, H> public constructor() {
|
||||||
|
public final inner class Inner3<I> public constructor() {
|
||||||
|
public final fun foo(x: test.InnerClasses<kotlin.String, F>.Inner<G, kotlin.Int>, y: test.InnerClasses<E, F>.Inner<E, kotlin.Double>, z: test.InnerClasses<kotlin.String, F>.Inner<G, kotlin.Int>.Inner3<kotlin.Double>, w: test.InnerClasses<E, F>.Inner<G, H>.Inner3<*>): kotlin.Unit { /* compiled code */ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public final inner class Inner2 public constructor() {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
class InnerClasses<E, F> {
|
||||||
|
inner class Inner<G, H> {
|
||||||
|
inner class Inner3<I> {
|
||||||
|
fun foo(
|
||||||
|
x: InnerClasses<String, F>.Inner<G, Int>,
|
||||||
|
y: Inner<E, Double>,
|
||||||
|
z: InnerClasses<String, F>.Inner<G, Int>.Inner3<Double>,
|
||||||
|
w: Inner3<*>) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class Inner2
|
||||||
|
|
||||||
|
fun bar(x: InnerClasses<String, Double>.Inner2, y: Inner2) {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// TODO Remove this restriction when nested classes will be supported in js backend.
|
||||||
|
// See KT-1907 Support nested classes in js-backend
|
||||||
|
// https://youtrack.jetbrains.com/issue/KT-1907
|
||||||
|
// TARGET_BACKEND: JVM
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
class InnerTypes<E, F> {
|
||||||
|
inner class Inner<G, H> {
|
||||||
|
inner class Inner3<I> {
|
||||||
|
fun foo(
|
||||||
|
x: InnerTypes<String, F>.Inner<G, Int>,
|
||||||
|
y: Inner<E, Double>,
|
||||||
|
z: InnerTypes<String, F>.Inner<G, Int>.Inner3<Double>,
|
||||||
|
w: Inner3<*>) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class Inner2
|
||||||
|
|
||||||
|
fun bar(x: InnerTypes<String, Double>.Inner2, y: Inner2) {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,217 @@
|
|||||||
|
PsiJetFileStubImpl[package=test]
|
||||||
|
PACKAGE_DIRECTIVE:
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=test]
|
||||||
|
IMPORT_LIST:
|
||||||
|
CLASS:[fqName=test.InnerTypes, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=InnerTypes, superNames=[]]
|
||||||
|
MODIFIER_LIST:[public final]
|
||||||
|
TYPE_PARAMETER_LIST:
|
||||||
|
TYPE_PARAMETER:[fqName=null, isInVariance=false, isOutVariance=false, name=E]
|
||||||
|
TYPE_PARAMETER:[fqName=null, isInVariance=false, isOutVariance=false, name=F]
|
||||||
|
PRIMARY_CONSTRUCTOR:
|
||||||
|
MODIFIER_LIST:[public]
|
||||||
|
VALUE_PARAMETER_LIST:
|
||||||
|
CLASS_BODY:
|
||||||
|
FUN:[fqName=test.InnerTypes.bar, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, name=bar]
|
||||||
|
MODIFIER_LIST:[public final]
|
||||||
|
VALUE_PARAMETER_LIST:
|
||||||
|
VALUE_PARAMETER:[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=x]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=test]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=InnerTypes]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=String]
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Double]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Inner2]
|
||||||
|
VALUE_PARAMETER:[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=y]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=test]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=InnerTypes]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=E]
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=F]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Inner2]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Unit]
|
||||||
|
CLASS:[fqName=test.InnerTypes.Inner, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=false, name=Inner, superNames=[]]
|
||||||
|
MODIFIER_LIST:[inner public final]
|
||||||
|
TYPE_PARAMETER_LIST:
|
||||||
|
TYPE_PARAMETER:[fqName=null, isInVariance=false, isOutVariance=false, name=G]
|
||||||
|
TYPE_PARAMETER:[fqName=null, isInVariance=false, isOutVariance=false, name=H]
|
||||||
|
PRIMARY_CONSTRUCTOR:
|
||||||
|
MODIFIER_LIST:[public]
|
||||||
|
VALUE_PARAMETER_LIST:
|
||||||
|
CLASS_BODY:
|
||||||
|
CLASS:[fqName=test.InnerTypes.Inner.Inner3, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=false, name=Inner3, superNames=[]]
|
||||||
|
MODIFIER_LIST:[inner public final]
|
||||||
|
TYPE_PARAMETER_LIST:
|
||||||
|
TYPE_PARAMETER:[fqName=null, isInVariance=false, isOutVariance=false, name=I]
|
||||||
|
PRIMARY_CONSTRUCTOR:
|
||||||
|
MODIFIER_LIST:[public]
|
||||||
|
VALUE_PARAMETER_LIST:
|
||||||
|
CLASS_BODY:
|
||||||
|
FUN:[fqName=test.InnerTypes.Inner.Inner3.foo, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, name=foo]
|
||||||
|
MODIFIER_LIST:[public final]
|
||||||
|
VALUE_PARAMETER_LIST:
|
||||||
|
VALUE_PARAMETER:[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=x]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=test]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=InnerTypes]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=String]
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=F]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Inner]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=G]
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Int]
|
||||||
|
VALUE_PARAMETER:[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=y]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=test]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=InnerTypes]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=E]
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=F]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Inner]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=E]
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Double]
|
||||||
|
VALUE_PARAMETER:[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=z]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=test]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=InnerTypes]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=String]
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=F]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Inner]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=G]
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Int]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Inner3]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Double]
|
||||||
|
VALUE_PARAMETER:[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=w]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=test]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=InnerTypes]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=E]
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=F]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Inner]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=G]
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=H]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Inner3]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=STAR]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Unit]
|
||||||
|
CLASS:[fqName=test.InnerTypes.Inner2, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=false, name=Inner2, superNames=[]]
|
||||||
|
MODIFIER_LIST:[inner public final]
|
||||||
|
PRIMARY_CONSTRUCTOR:
|
||||||
|
MODIFIER_LIST:[public]
|
||||||
|
VALUE_PARAMETER_LIST:
|
||||||
|
CLASS_BODY:
|
||||||
@@ -71,7 +71,17 @@ PsiJetFileStubImpl[package=test]
|
|||||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
REFERENCE_EXPRESSION:[referencedName=test]
|
REFERENCE_EXPRESSION:[referencedName=test]
|
||||||
REFERENCE_EXPRESSION:[referencedName=NestedClasses]
|
REFERENCE_EXPRESSION:[referencedName=NestedClasses]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=TOuter]
|
||||||
REFERENCE_EXPRESSION:[referencedName=Inner]
|
REFERENCE_EXPRESSION:[referencedName=Inner]
|
||||||
|
TYPE_ARGUMENT_LIST:
|
||||||
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=TI]
|
||||||
REFERENCE_EXPRESSION:[referencedName=II]
|
REFERENCE_EXPRESSION:[referencedName=II]
|
||||||
TYPE_ARGUMENT_LIST:
|
TYPE_ARGUMENT_LIST:
|
||||||
TYPE_PROJECTION:[projectionKind=NONE]
|
TYPE_PROJECTION:[projectionKind=NONE]
|
||||||
|
|||||||
+6
@@ -107,6 +107,12 @@ public class ClsStubBuilderTestGenerated extends AbstractClsStubBuilderTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InnerTypes")
|
||||||
|
public void testInnerTypes() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/InnerTypes/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("LocalClass")
|
@TestMetadata("LocalClass")
|
||||||
public void testLocalClass() throws Exception {
|
public void testLocalClass() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/LocalClass/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/LocalClass/");
|
||||||
|
|||||||
+6
@@ -43,6 +43,12 @@ public class CommonDecompiledTextFromJsMetadataTestGenerated extends AbstractCom
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InnerClasses")
|
||||||
|
public void ignoredInnerClasses() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/InnerClasses/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("NestedClasses")
|
@TestMetadata("NestedClasses")
|
||||||
public void ignoredNestedClasses() throws Exception {
|
public void ignoredNestedClasses() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/NestedClasses/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/NestedClasses/");
|
||||||
|
|||||||
+6
@@ -95,6 +95,12 @@ public class CommonDecompiledTextTestGenerated extends AbstractCommonDecompiledT
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InnerClasses")
|
||||||
|
public void testInnerClasses() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/InnerClasses/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("Modifiers")
|
@TestMetadata("Modifiers")
|
||||||
public void testModifiers() throws Exception {
|
public void testModifiers() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Modifiers/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Modifiers/");
|
||||||
|
|||||||
Reference in New Issue
Block a user