Implement stub building for inner types

This commit is contained in:
Denis Zharkov
2015-11-11 14:43:19 +03:00
parent 7500447e72
commit 6ae653e5a1
14 changed files with 377 additions and 20 deletions
@@ -16,8 +16,9 @@
package org.jetbrains.kotlin.descriptors
import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.types.TypeProjection
import org.jetbrains.kotlin.types.*
import org.jetbrains.kotlin.types.error.MissingDependencyErrorClass
import java.util.*
fun ClassDescriptor.computeConstructorTypeParameters(): List<TypeParameterDescriptor> {
val declaredParameters = declaredTypeParameters
@@ -55,8 +56,13 @@ class PossiblyInnerType(
fun segments(): List<PossiblyInnerType> = outerType?.segments().orEmpty() + this
}
fun KotlinType.buildPossiblyInnerType(): PossiblyInnerType?
= buildPossiblyInnerType(constructor.declarationDescriptor as? ClassDescriptor, 0)
fun KotlinType.buildPossiblyInnerType(): PossiblyInnerType? {
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? {
if (classDescriptor == null) return null
@@ -16,6 +16,7 @@
package org.jetbrains.kotlin.types
import org.jetbrains.kotlin.descriptors.PossiblyInnerType
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
public interface TypeCapability
@@ -28,6 +29,18 @@ public interface TypeCapabilities {
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 interface Specificity : TypeCapability {
@@ -88,3 +101,7 @@ public fun sameTypeConstructors(first: KotlinType, second: KotlinType): Boolean
interface CustomSubstitutionCapability : TypeCapability {
public val substitution: TypeSubstitution
}
interface PossiblyInnerTypeCapability : TypeCapability {
public val possiblyInnerType: PossiblyInnerType?
}
@@ -16,6 +16,8 @@
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.Annotations
import org.jetbrains.kotlin.serialization.ProtoBuf
@@ -58,7 +60,34 @@ class DeserializedType(
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)
}
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.idea.decompiler.stubBuilder
import com.google.protobuf.MessageLite
import com.intellij.psi.PsiElement
import com.intellij.psi.stubs.StubElement
import com.intellij.util.SmartList
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
import org.jetbrains.kotlin.lexer.KtModifierKeywordToken
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.Argument.Projection
import org.jetbrains.kotlin.serialization.ProtoBuf.TypeParameter.Variance
import org.jetbrains.kotlin.serialization.deserialization.ProtoContainer
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.serialization.deserialization.*
import org.jetbrains.kotlin.types.DynamicTypeCapabilities
import org.jetbrains.kotlin.utils.addToStdlib.singletonOrEmptyList
import java.util.*
@@ -88,9 +86,12 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) {
return
}
createTypeAnnotationStubs(parent, annotations)
val typeStub = createStubForTypeName(classId, parent)
val typeArgumentProtoList = type.getArgumentList()
createTypeArgumentListStub(typeStub, typeArgumentProtoList)
val outerTypeChain = sequence(type) { it.outerType(c.typeTable) }.toList()
createStubForTypeName(classId, parent) {
userTypeStub, index ->
outerTypeChain.getOrNull(index)?.let { createTypeArgumentListStub(userTypeStub, it.argumentList) }
}
}
private fun createTypeAnnotationStubs(parent: KotlinStubBaseImpl<*>, annotations: List<ClassId>) {
@@ -127,25 +127,29 @@ fun createStubForPackageName(packageDirectiveStub: KotlinPlaceHolderStubImpl<KtP
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 =
if (typeClassId.isLocal()) KotlinBuiltIns.FQ_NAMES.any
else typeClassId.asSingleFqName().toUnsafe()
val segments = fqName.pathSegments().toArrayList()
val segments = fqName.pathSegments().asReversed()
assert(segments.isNotEmpty())
val iterator = segments.listIterator(segments.size)
fun recCreateStubForType(current: StubElement<out PsiElement>): KotlinUserTypeStub {
val lastSegment = iterator.previous()
fun recCreateStubForType(current: StubElement<out PsiElement>, level: Int): KotlinUserTypeStub {
val lastSegment = segments[level]
val userTypeStub = KotlinUserTypeStubImpl(current, isAbsoluteInRootPackage = false)
if (iterator.hasPrevious()) {
recCreateStubForType(userTypeStub)
if (level + 1 < segments.size) {
recCreateStubForType(userTypeStub, level + 1)
}
KotlinNameReferenceExpressionStubImpl(userTypeStub, lastSegment.ref())
onUserTypeLevel(userTypeStub, level)
return userTypeStub
}
return recCreateStubForType(parent)
return recCreateStubForType(parent, level = 0)
}
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]
REFERENCE_EXPRESSION:[referencedName=test]
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]
TYPE_ARGUMENT_LIST:
TYPE_PROJECTION:[projectionKind=NONE]
TYPE_REFERENCE:
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=TI]
REFERENCE_EXPRESSION:[referencedName=II]
TYPE_ARGUMENT_LIST:
TYPE_PROJECTION:[projectionKind=NONE]
@@ -107,6 +107,12 @@ public class ClsStubBuilderTestGenerated extends AbstractClsStubBuilderTest {
doTest(fileName);
}
@TestMetadata("InnerTypes")
public void testInnerTypes() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/InnerTypes/");
doTest(fileName);
}
@TestMetadata("LocalClass")
public void testLocalClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/LocalClass/");
@@ -43,6 +43,12 @@ public class CommonDecompiledTextFromJsMetadataTestGenerated extends AbstractCom
doTest(fileName);
}
@TestMetadata("InnerClasses")
public void ignoredInnerClasses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/InnerClasses/");
doTest(fileName);
}
@TestMetadata("NestedClasses")
public void ignoredNestedClasses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/NestedClasses/");
@@ -95,6 +95,12 @@ public class CommonDecompiledTextTestGenerated extends AbstractCommonDecompiledT
doTest(fileName);
}
@TestMetadata("InnerClasses")
public void testInnerClasses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/InnerClasses/");
doTest(fileName);
}
@TestMetadata("Modifiers")
public void testModifiers() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Modifiers/");