Add FIR enhancement tests, fix some exceptions / problems around them
Test data and tests themselves are based on compiler/testData/loadJava/compiledJava
This commit is contained in:
@@ -207,7 +207,7 @@ private fun JavaAnnotationArgument.toFirExpression(session: FirSession): FirExpr
|
||||
null
|
||||
}
|
||||
this.calleeReference = calleeReference
|
||||
?: FirErrorNamedReference(session, null, "Strange Java enum value: ${this@toFirExpression}")
|
||||
?: FirErrorNamedReference(session, null, "Strange Java enum value: $classId.$entryName")
|
||||
}
|
||||
}
|
||||
is JavaClassObjectAnnotationArgument -> FirGetClassCallImpl(session, null).apply {
|
||||
|
||||
+6
-3
@@ -53,9 +53,12 @@ internal class EnhancementSignatureParts(
|
||||
}
|
||||
|
||||
val containsFunctionN = current.toNotNullConeKotlinType().contains {
|
||||
val classId = it.lookupTag.classId
|
||||
classId.shortClassName == JavaToKotlinClassMap.FUNCTION_N_FQ_NAME.shortName() &&
|
||||
classId.asSingleFqName() == JavaToKotlinClassMap.FUNCTION_N_FQ_NAME
|
||||
if (it is ConeClassErrorType) false
|
||||
else {
|
||||
val classId = it.lookupTag.classId
|
||||
classId.shortClassName == JavaToKotlinClassMap.FUNCTION_N_FQ_NAME.shortName() &&
|
||||
classId.asSingleFqName() == JavaToKotlinClassMap.FUNCTION_N_FQ_NAME
|
||||
}
|
||||
}
|
||||
|
||||
val enhancedCurrent = current.enhance(qualifiersWithPredefined ?: qualifiers)
|
||||
|
||||
+1
-6
@@ -10,8 +10,6 @@ import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||
import org.jetbrains.kotlin.fir.expressions.*
|
||||
import org.jetbrains.kotlin.fir.resolve.toSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol
|
||||
import org.jetbrains.kotlin.fir.types.ConeClassLikeType
|
||||
import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef
|
||||
import org.jetbrains.kotlin.load.java.*
|
||||
import org.jetbrains.kotlin.load.java.lazy.NullabilityQualifierWithApplicability
|
||||
import org.jetbrains.kotlin.utils.Jsr305State
|
||||
@@ -50,10 +48,7 @@ class FirAnnotationTypeQualifierResolver(private val jsr305State: Jsr305State) {
|
||||
}
|
||||
|
||||
private val FirAnnotationCall.resolvedClass: FirRegularClass?
|
||||
get() {
|
||||
val lookupTag = ((annotationTypeRef as? FirResolvedTypeRef)?.type as? ConeClassLikeType)?.lookupTag
|
||||
return (lookupTag?.toSymbol(session) as? FirClassSymbol)?.fir
|
||||
}
|
||||
get() = (coneClassLikeType?.lookupTag?.toSymbol(session) as? FirClassSymbol)?.fir
|
||||
|
||||
fun resolveTypeQualifierAnnotation(annotationCall: FirAnnotationCall): FirAnnotationCall? {
|
||||
if (jsr305State.disabled) {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
FIR enhancement tests use compiler/testData/loadJava/compilerJava
|
||||
@@ -27,7 +27,7 @@ abstract class AbstractFirResolveTestCase : AbstractFirResolveWithSessionTestCas
|
||||
|
||||
val scope = GlobalSearchScope.filesScope(project, ktFiles.mapNotNull { it.virtualFile })
|
||||
.uniteWith(TopDownAnalyzerFacadeForJVM.AllJavaSourcesInProjectScope(project))
|
||||
val session = createSession(scope)
|
||||
val session = createSession(project, scope)
|
||||
|
||||
val builder = RawFirBuilder(session, stubMode = false)
|
||||
|
||||
|
||||
-15
@@ -24,19 +24,4 @@ abstract class AbstractFirResolveWithSessionTestCase : KotlinTestWithEnvironment
|
||||
.unregisterExtension(JavaElementFinder::class.java)
|
||||
}
|
||||
|
||||
open fun createSession(sourceScope: GlobalSearchScope): FirSession {
|
||||
val moduleInfo = FirTestModuleInfo()
|
||||
val provider = FirProjectSessionProvider(project)
|
||||
return FirJavaModuleBasedSession(moduleInfo, provider, sourceScope).also {
|
||||
createSessionForDependencies(provider, moduleInfo, sourceScope)
|
||||
}
|
||||
}
|
||||
|
||||
private fun createSessionForDependencies(
|
||||
provider: FirProjectSessionProvider, moduleInfo: FirTestModuleInfo, sourceScope: GlobalSearchScope
|
||||
) {
|
||||
val dependenciesInfo = FirTestModuleInfo()
|
||||
moduleInfo.dependencies.add(dependenciesInfo)
|
||||
FirLibrarySession(dependenciesInfo, provider, GlobalSearchScope.notScope(sourceScope))
|
||||
}
|
||||
}
|
||||
-15
@@ -16,19 +16,4 @@ import org.jetbrains.kotlin.test.KotlinTestWithEnvironment
|
||||
|
||||
abstract class AbstractFirResolveWithSessionTestCase : KotlinTestWithEnvironment() {
|
||||
|
||||
open fun createSession(sourceScope: GlobalSearchScope): FirSession {
|
||||
val moduleInfo = FirTestModuleInfo()
|
||||
val provider = FirProjectSessionProvider(project)
|
||||
return FirJavaModuleBasedSession(moduleInfo, provider, sourceScope).also {
|
||||
createSessionForDependencies(provider, moduleInfo, sourceScope)
|
||||
}
|
||||
}
|
||||
|
||||
private fun createSessionForDependencies(
|
||||
provider: FirProjectSessionProvider, moduleInfo: FirTestModuleInfo, sourceScope: GlobalSearchScope
|
||||
) {
|
||||
val dependenciesInfo = FirTestModuleInfo()
|
||||
moduleInfo.dependencies.add(dependenciesInfo)
|
||||
FirLibrarySession(dependenciesInfo, provider, GlobalSearchScope.notScope(sourceScope))
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ class FirResolveTestTotalKotlin : AbstractFirResolveWithSessionTestCase() {
|
||||
}
|
||||
|
||||
val scope = ProjectScope.getContentScope(project)
|
||||
val session = createSession(scope)
|
||||
val session = createSession(project, scope)
|
||||
val builder = RawFirBuilder(session, stubMode = true)
|
||||
|
||||
val totalTransformer = FirTotalResolveTransformer()
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.fir
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
import org.jetbrains.kotlin.fir.java.FirJavaModuleBasedSession
|
||||
import org.jetbrains.kotlin.fir.java.FirLibrarySession
|
||||
import org.jetbrains.kotlin.fir.java.FirProjectSessionProvider
|
||||
|
||||
fun createSession(project: Project, sourceScope: GlobalSearchScope): FirSession {
|
||||
val moduleInfo = FirTestModuleInfo()
|
||||
val provider = FirProjectSessionProvider(project)
|
||||
return FirJavaModuleBasedSession(moduleInfo, provider, sourceScope).also {
|
||||
createSessionForDependencies(provider, moduleInfo, sourceScope)
|
||||
}
|
||||
}
|
||||
|
||||
private fun createSessionForDependencies(
|
||||
provider: FirProjectSessionProvider, moduleInfo: FirTestModuleInfo, sourceScope: GlobalSearchScope
|
||||
) {
|
||||
val dependenciesInfo = FirTestModuleInfo()
|
||||
moduleInfo.dependencies.add(dependenciesInfo)
|
||||
FirLibrarySession(dependenciesInfo, provider, GlobalSearchScope.notScope(sourceScope))
|
||||
}
|
||||
+217
@@ -0,0 +1,217 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.fir.java
|
||||
|
||||
import com.intellij.lang.java.JavaLanguage
|
||||
import com.intellij.openapi.extensions.Extensions
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.openapi.util.text.StringUtilRt
|
||||
import com.intellij.psi.*
|
||||
import com.intellij.psi.impl.PsiFileFactoryImpl
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
import com.intellij.testFramework.LightVirtualFile
|
||||
import org.jetbrains.kotlin.asJava.finder.JavaElementFinder
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM
|
||||
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime
|
||||
import org.jetbrains.kotlin.fir.FirRenderer
|
||||
import org.jetbrains.kotlin.fir.createSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
|
||||
import org.jetbrains.kotlin.fir.java.declarations.FirJavaClass
|
||||
import org.jetbrains.kotlin.fir.java.declarations.FirJavaMethod
|
||||
import org.jetbrains.kotlin.fir.java.scopes.JavaClassEnhancementScope
|
||||
import org.jetbrains.kotlin.fir.resolve.FirScopeProvider
|
||||
import org.jetbrains.kotlin.fir.resolve.FirSymbolProvider
|
||||
import org.jetbrains.kotlin.fir.resolve.impl.FirCompositeSymbolProvider
|
||||
import org.jetbrains.kotlin.fir.scopes.ProcessorAction
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.FirCompositeScope
|
||||
import org.jetbrains.kotlin.fir.service
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirFunctionSymbol
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getChildrenOfType
|
||||
import org.jetbrains.kotlin.test.*
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils.getAnnotationsJar
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils.newConfiguration
|
||||
import org.jetbrains.kotlin.test.testFramework.KtUsefulTestCase
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
|
||||
abstract class AbstractFirTypeEnhancementTest : KtUsefulTestCase() {
|
||||
private lateinit var javaFilesDir: File
|
||||
|
||||
private lateinit var environment: KotlinCoreEnvironment
|
||||
|
||||
val project: Project
|
||||
get() {
|
||||
return environment.project
|
||||
}
|
||||
|
||||
@Throws(Exception::class)
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
javaFilesDir = KotlinTestUtils.tmpDirForTest(this)
|
||||
}
|
||||
|
||||
override fun tearDown() {
|
||||
FileUtil.delete(javaFilesDir)
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
private fun createJarWithForeignAnnotations(): File =
|
||||
MockLibraryUtil.compileJavaFilesLibraryToJar(FOREIGN_ANNOTATIONS_SOURCES_PATH, "foreign-annotations")
|
||||
|
||||
private fun createEnvironment(content: String): KotlinCoreEnvironment {
|
||||
val classpath = mutableListOf(getAnnotationsJar(), ForTestCompileRuntime.runtimeJarForTests())
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(content, "ANDROID_ANNOTATIONS")) {
|
||||
classpath.add(ForTestCompileRuntime.androidAnnotationsForTests())
|
||||
}
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(content, "JVM_ANNOTATIONS")) {
|
||||
classpath.add(ForTestCompileRuntime.jvmAnnotationsForTests())
|
||||
}
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(content, "FOREIGN_ANNOTATIONS")) {
|
||||
classpath.add(createJarWithForeignAnnotations())
|
||||
}
|
||||
return KotlinCoreEnvironment.createForTests(
|
||||
testRootDisposable,
|
||||
newConfiguration(
|
||||
ConfigurationKind.JDK_NO_RUNTIME, TestJdkKind.FULL_JDK, classpath, listOf(javaFilesDir)
|
||||
),
|
||||
EnvironmentConfigFiles.JVM_CONFIG_FILES
|
||||
).apply {
|
||||
Extensions.getArea(project)
|
||||
.getExtensionPoint(PsiElementFinder.EP_NAME)
|
||||
.unregisterExtension(JavaElementFinder::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
fun doTest(path: String) {
|
||||
val javaFile = File(path)
|
||||
val javaLines = javaFile.readLines()
|
||||
val content = javaLines.joinToString(separator = "\n")
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(content, "SKIP_IN_FIR_TEST")) return
|
||||
|
||||
val srcFiles = KotlinTestUtils.createTestFiles<Void, File>(
|
||||
javaFile.name, FileUtil.loadFile(javaFile, true),
|
||||
object : KotlinTestUtils.TestFileFactoryNoModules<File>() {
|
||||
override fun create(fileName: String, text: String, directives: Map<String, String>): File {
|
||||
var currentDir = javaFilesDir
|
||||
if ("/" !in fileName) {
|
||||
val packageFqName =
|
||||
text.split("\n").firstOrNull {
|
||||
it.startsWith("package")
|
||||
}?.substringAfter("package")?.trim()?.substringBefore(";")?.let { name ->
|
||||
FqName(name)
|
||||
} ?: FqName.ROOT
|
||||
for (segment in packageFqName.pathSegments()) {
|
||||
currentDir = File(currentDir, segment.asString()).apply { mkdir() }
|
||||
}
|
||||
}
|
||||
val targetFile = File(currentDir, fileName)
|
||||
try {
|
||||
FileUtil.writeToFile(targetFile, text)
|
||||
} catch (e: IOException) {
|
||||
throw AssertionError(e)
|
||||
}
|
||||
|
||||
return targetFile
|
||||
}
|
||||
}, ""
|
||||
)
|
||||
environment = createEnvironment(content)
|
||||
val virtualFiles = srcFiles.map {
|
||||
object : LightVirtualFile(
|
||||
it.name, JavaLanguage.INSTANCE, StringUtilRt.convertLineSeparators(it.readText())
|
||||
) {
|
||||
override fun getPath(): String {
|
||||
//TODO: patch LightVirtualFile
|
||||
return "/${it.name}"
|
||||
}
|
||||
}
|
||||
}
|
||||
val factory = PsiFileFactory.getInstance(project) as PsiFileFactoryImpl
|
||||
val psiFiles = virtualFiles.map { factory.trySetupPsiForFile(it, JavaLanguage.INSTANCE, true, false)!! }
|
||||
|
||||
val scope = GlobalSearchScope.filesScope(project, virtualFiles)
|
||||
.uniteWith(TopDownAnalyzerFacadeForJVM.AllJavaSourcesInProjectScope(project))
|
||||
val session = createSession(project, scope)
|
||||
|
||||
val topPsiClasses = psiFiles.flatMap { it.getChildrenOfType<PsiClass>().toList() }
|
||||
|
||||
val javaFirDump = StringBuilder().also { builder ->
|
||||
val renderer = FirRenderer(builder)
|
||||
val symbolProvider = session.service<FirSymbolProvider>() as FirCompositeSymbolProvider
|
||||
val javaProvider = symbolProvider.providers.filterIsInstance<JavaSymbolProvider>().first()
|
||||
|
||||
fun processClassWithChildren(psiClass: PsiClass, parentFqName: FqName) {
|
||||
val psiFile = psiClass.containingFile
|
||||
val packageStatement = psiFile.children.filterIsInstance<PsiPackageStatement>().firstOrNull()
|
||||
val packageName = packageStatement?.packageName
|
||||
val fqName = parentFqName.child(Name.identifier(psiClass.name!!))
|
||||
val classId = ClassId(packageName?.let { FqName(it) } ?: FqName.ROOT, fqName, false)
|
||||
javaProvider.getClassLikeSymbolByFqName(classId)
|
||||
?: throw AssertionError(classId.asString())
|
||||
psiClass.innerClasses.forEach {
|
||||
processClassWithChildren(psiClass = it, parentFqName = fqName)
|
||||
}
|
||||
}
|
||||
for (psiClass in topPsiClasses) {
|
||||
processClassWithChildren(psiClass, FqName.ROOT)
|
||||
}
|
||||
|
||||
val processedJavaClasses = mutableSetOf<FirJavaClass>()
|
||||
for (javaClass in javaProvider.getJavaTopLevelClasses().sortedBy { it.name }) {
|
||||
if (javaClass !is FirJavaClass || javaClass in processedJavaClasses) continue
|
||||
val enhancementScope = session.service<FirScopeProvider>().getDeclaredMemberScope(javaClass, session).let {
|
||||
when (it) {
|
||||
is FirCompositeScope -> it.scopes.filterIsInstance<JavaClassEnhancementScope>().first()
|
||||
is JavaClassEnhancementScope -> it
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
if (enhancementScope == null) {
|
||||
javaClass.accept(renderer, null)
|
||||
} else {
|
||||
renderer.visitMemberDeclaration(javaClass)
|
||||
renderer.renderSupertypes(javaClass)
|
||||
renderer.renderInBraces {
|
||||
val renderedDeclarations = mutableListOf<FirDeclaration>()
|
||||
for (declaration in javaClass.declarations) {
|
||||
if (declaration in renderedDeclarations) continue
|
||||
when (declaration) {
|
||||
is FirJavaMethod -> enhancementScope.processFunctionsByName(declaration.name) { symbol ->
|
||||
val enhanced = (symbol as? FirFunctionSymbol)?.fir
|
||||
if (enhanced != null && enhanced !in renderedDeclarations) {
|
||||
enhanced.accept(renderer, null)
|
||||
renderer.newLine()
|
||||
renderedDeclarations += enhanced
|
||||
}
|
||||
ProcessorAction.NEXT
|
||||
}
|
||||
else -> {
|
||||
declaration.accept(renderer, null)
|
||||
renderer.newLine()
|
||||
renderedDeclarations += declaration
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
processedJavaClasses += javaClass
|
||||
}
|
||||
}.toString()
|
||||
|
||||
val expectedFile = File(javaFile.absolutePath.replace(".java", ".fir.txt"))
|
||||
KotlinTestUtils.assertEqualsToFile(expectedFile, javaFirDump)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val FOREIGN_ANNOTATIONS_SOURCES_PATH = "third-party/annotations"
|
||||
}
|
||||
}
|
||||
Generated
+1648
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,7 @@ import org.jetbrains.kotlin.fir.BaseTransformedType
|
||||
import org.jetbrains.kotlin.fir.types.ConeClassLikeType
|
||||
import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.FirTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
|
||||
@@ -29,5 +30,8 @@ interface FirAnnotationCall : FirCall {
|
||||
}
|
||||
}
|
||||
|
||||
val FirAnnotationCall.coneClassLikeType: ConeClassLikeType?
|
||||
get() = ((annotationTypeRef as? FirResolvedTypeRef)?.type as? ConeClassLikeType)?.takeIf { it !is ConeClassErrorType }
|
||||
|
||||
val FirAnnotationCall.resolvedFqName: FqName?
|
||||
get() = ((annotationTypeRef as? FirResolvedTypeRef)?.type as? ConeClassLikeType)?.lookupTag?.classId?.asSingleFqName()
|
||||
get() = coneClassLikeType?.lookupTag?.classId?.asSingleFqName()
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
public final class ArrayTypeVariance : R|java/lang/Object| {
|
||||
public final operator function toArray(p0: R|kotlin/Array<ft<java/lang/Object, java/lang/Object?>>|): R|kotlin/Array<ft<java/lang/Object, java/lang/Object?>>|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public abstract class ClassDoesNotOverrideMethod : R|java/util/Date| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public final class ClassWithConstVal : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<P> public final class ClassWithTypeP : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
<P> public abstract class ClassWithTypePExtendsIterableP : R|java/lang/Object|, R|java/lang/Iterable<P>| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<P, Q> public final class ClassWithTypePP : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<R, P> public open class ClassWithTypePRefNext : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<P> public final class ClassWithTypePRefSelf : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<P> public final class ClassWithTypePRefSelfAndClass : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public final class FieldAsVar : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public open class FieldOfArrayType : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public final class FinalFieldAsVal : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public final class InheritMethodsDifferentReturnTypes : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public final class InheritMethodsDifferentReturnTypesGeneric : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public open class InnerClass : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<P> public open class InnerClassReferencesOuterTP : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public open class InnerClassTypeMultipleGeneric : R|java/lang/Object| {
|
||||
public open operator function staticType(): R|ft<test/InnerClassTypeMultipleGeneric.Outer.Inner<ft<java/lang/Byte, java/lang/Byte?>, ft<java/lang/Character, java/lang/Character?>, ft<java/lang/Boolean, java/lang/Boolean?>>, test/InnerClassTypeMultipleGeneric.Outer.Inner<ft<java/lang/Byte, java/lang/Byte?>, ft<java/lang/Character, java/lang/Character?>, ft<java/lang/Boolean, java/lang/Boolean?>>>|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<P, Q> public open class InnerClassesInGeneric : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public open class InnerOfGeneric : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
public abstract interface IntrinsicCompanionObject : R|java/lang/Object| {
|
||||
public abstract operator function testInt(i: R|ft<kotlin/jvm/internal/IntCompanionObject, kotlin/jvm/internal/IntCompanionObject?>|!): R|kotlin/Unit|
|
||||
|
||||
public abstract operator function testChar(c: R|ft<kotlin/jvm/internal/CharCompanionObject, kotlin/jvm/internal/CharCompanionObject?>|!): R|kotlin/Unit|
|
||||
|
||||
public abstract operator function testString(s: R|ft<kotlin/jvm/internal/StringCompanionObject, kotlin/jvm/internal/StringCompanionObject?>|!): R|kotlin/Unit|
|
||||
|
||||
public abstract operator function testBoolean(b: R|ft<kotlin/jvm/internal/BooleanCompanionObject, kotlin/jvm/internal/BooleanCompanionObject?>|!): R|kotlin/Unit|
|
||||
|
||||
public abstract operator function testEnum(e: R|ft<kotlin/jvm/internal/EnumCompanionObject, kotlin/jvm/internal/EnumCompanionObject?>|!): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<P> public final class MethodReferencesOuterClassTP : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public open class MethodTypePOneUpperBound : R|java/lang/Object| {
|
||||
public open operator function bar(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public open class MethodTypePTwoUpperBounds : R|java/lang/Object| {
|
||||
public open operator function foo(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public final class MethodWithTypeP : R|java/lang/Object| {
|
||||
public final operator function f(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public final class MethodWithTypePP : R|java/lang/Object| {
|
||||
public final operator function f(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<P> public open class MethodWithTypePRefClassP : R|java/lang/Object| {
|
||||
public final operator function f(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public final class MethosWithPRefTP : R|java/lang/Object| {
|
||||
public final operator function f(p: R|ft<P, P?>|!): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public open class MyException : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public open class NestedClass : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public open class OverrideMethod : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public open class Frame : R|java/lang/Object| {
|
||||
}
|
||||
public open class JFrame : R|awt/Frame| {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public open class PrivateMembers : R|java/lang/Object| {
|
||||
private open operator function method(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public open class PrivateMembersInHierarchy : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public open class RawOverrides : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public abstract interface RawTypeWithUpperBound : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<T> public abstract interface RawUpperBound : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<T> public abstract interface RecursiveRawUpperBound : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<T> public abstract interface RecursiveWildcardUpperBound : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public abstract interface RemoveRedundantProjectionKind : R|java/lang/Object| {
|
||||
public abstract operator function f(collection: R|ft<java/util/Collection<class error: Unexpected type argument: JavaWildcardTypeImpl: PsiType:? extends CharSequence>, java/util/Collection<class error: Unexpected type argument: JavaWildcardTypeImpl: PsiType:? extends CharSequence>?>|!): R|kotlin/Unit|
|
||||
|
||||
public abstract operator function f(comparator: R|ft<java/lang/Comparable<class error: Unexpected type argument: JavaWildcardTypeImpl: PsiType:? super CharSequence>, java/lang/Comparable<class error: Unexpected type argument: JavaWildcardTypeImpl: PsiType:? super CharSequence>?>|!): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public final class Simple : R|java/lang/Object| {
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// SKIP_IN_FIR_TEST
|
||||
package test;
|
||||
|
||||
public class SubclassFromNested implements B.C {
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
public open class TopLevel$Class : R|java/lang/Object| {
|
||||
public open operator function foo(other: R|ft<test/TopLevel$Class, test/TopLevel$Class?>|!): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public final class TwoFields : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public final class UnboundWildcard : R|java/lang/Object| {
|
||||
public final operator function foo(): R|ft<test/UnboundWildcard.MyClass<class error: Unexpected type argument: JavaWildcardTypeImpl: PsiType:?>, test/UnboundWildcard.MyClass<class error: Unexpected type argument: JavaWildcardTypeImpl: PsiType:?>?>|!
|
||||
|
||||
public final operator function collection(): R|ft<java/util/Collection<class error: Unexpected type argument: JavaWildcardTypeImpl: PsiType:?>, java/util/Collection<class error: Unexpected type argument: JavaWildcardTypeImpl: PsiType:?>?>|!
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public open class WildcardBounds : R|java/lang/Object| {
|
||||
public/*package*/ open operator function foo(x: R|ft<test/WildcardBounds.A<class error: Unexpected type argument: JavaWildcardTypeImpl: PsiType:? extends CharSequence>, test/WildcardBounds.A<class error: Unexpected type argument: JavaWildcardTypeImpl: PsiType:? extends CharSequence>?>|!, y: R|ft<test/WildcardBounds.A<class error: Unexpected type argument: JavaWildcardTypeImpl: PsiType:? super String>, test/WildcardBounds.A<class error: Unexpected type argument: JavaWildcardTypeImpl: PsiType:? super String>?>|!): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
@R|test/AnnotatedAnnotation|() public abstract annotation class AnnotatedAnnotation : R|java/lang/annotation/Annotation| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public open class AnnotatedConstructor : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public final enum class AnnotatedEnumEntry : R|java/lang/Enum<test/AnnotatedEnumEntry>| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public open class AnnotatedField : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public open class AnnotatedMethod : R|java/lang/Object| {
|
||||
@R|test/AnnotatedMethod.Anno|(Int(42)) public open operator function f(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// SKIP_IN_FIR_TEST
|
||||
package test;
|
||||
|
||||
class AnnotatedParameterInInnerClassConstructor {
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public/*package*/ open class AnnotatedParameterInInnerClassConstructor : R|java/lang/Object| {
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// SKIP_IN_FIR_TEST
|
||||
// SKIP_IN_RUNTIME_TEST
|
||||
package test;
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// SKIP_IN_FIR_TEST
|
||||
// SKIP_IN_RUNTIME_TEST
|
||||
package test;
|
||||
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
public/*package*/ open class AnnotatedTypeInFun : R|java/lang/Object| {
|
||||
public/*package*/ open operator function foo(@R|test/AnnotatedTypeInFun.Anno|(String(a)) a: @R|test/AnnotatedTypeInFun.Anno|(String(a)) R|ft<java/lang/String, java/lang/String?>|!, @R|test/AnnotatedTypeInFun.Anno|(String(b)) b: @R|test/AnnotatedTypeInFun.Anno|(String(b)) R|ft<java/lang/String, java/lang/String?>|!): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// SKIP_IN_FIR_TEST
|
||||
// SKIP_IN_RUNTIME_TEST
|
||||
package test;
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// SKIP_IN_FIR_TEST
|
||||
// SKIP_IN_RUNTIME_TEST
|
||||
package test;
|
||||
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
public open class AnnotatedValueParameter : R|java/lang/Object| {
|
||||
public open operator function f(@R|test/AnnotatedValueParameter.Anno|(String(non-empty)) parameter: R|ft<java/util/List<ft<java/lang/String, java/lang/String?>>, java/util/List<ft<java/lang/String, java/lang/String?>>>|): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public abstract interface AnnotationInParam : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public open class AnnotationRetentions : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public open class AnnotationTargets : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public open class ArithmeticExpressionInParam : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public abstract interface ArrayOfEnumInParam : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public abstract interface ArrayOfStringInParam : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public open class ClassObjectArrayInParam : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public open class ClassObjectInParam : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public open class ClassObjectInParamRaw : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public open class ClassObjectInParamVariance : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public abstract interface CustomAnnotation : R|java/lang/Object| {
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
public abstract interface CustomAnnotationWithDefaultParameter : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public abstract interface EmptyArrayInParam : R|java/lang/Object| {
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
public open class EnumArgumentWithCustomToString : R|java/lang/Object| {
|
||||
@R|test/EnumArgumentWithCustomToString.EnumAnno|(<Strange Java enum value: test/EnumArgumentWithCustomToString.E.CAKE>#()) @R|test/EnumArgumentWithCustomToString.EnumArrayAnno|(<implicitArrayOf>(<Strange Java enum value: test/EnumArgumentWithCustomToString.E.CAKE>#(), <Strange Java enum value: test/EnumArgumentWithCustomToString.E.CAKE>#())) public/*package*/ open operator function annotated(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public final enum class EnumConstructorParameter : R|java/lang/Enum<test/EnumConstructorParameter>| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public abstract interface EnumInParam : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public open class JavaDocDeprecated : R|java/lang/Object| {
|
||||
public open operator function getFoo(text: R|ft<java/lang/String, java/lang/String?>|!): R|ft<java/lang/String, java/lang/String?>|!
|
||||
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
public open class NestedEnumArgument : R|java/lang/Object| {
|
||||
@R|test/NestedEnumArgument.Anno|(<Strange Java enum value: test/NestedEnumArgument.E.FIRST>#()) public/*package*/ open operator function foo(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public abstract interface PrimitiveValueInParam : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public abstract interface RecursiveAnnotation : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public abstract interface RecursiveAnnotation2 : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public abstract annotation class SimpleAnnotation : R|java/lang/annotation/Annotation| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public abstract interface StringConcatenationInParam : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public abstract interface StringConstantInParam : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public abstract interface StringInParam : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public open class ConstructorGenericDeep : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public open class ConstructorGenericSimple : R|java/lang/Object| {
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public open class ConstructorGenericUpperBound : R|java/lang/Object| {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public final enum class EnumMembers : R|java/lang/Enum<test/EnumMembers>| {
|
||||
public open operator function first(): R|kotlin/Boolean|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public open enum class EnumWithSpecializedEntry : R|java/lang/Enum<test/EnumWithSpecializedEntry>| {
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user