Psi2ir: ignore unresolved annotations

Note that the test is an exact copy of an existing test
missingDependencyNestedAnnotation, but with -Xuse-ir
This commit is contained in:
Alexander Udalov
2019-06-27 20:27:53 +02:00
parent 9062f4229b
commit 385366384c
12 changed files with 53 additions and 17 deletions
@@ -77,11 +77,11 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
private fun analyzeAndGetAllDescriptors(vararg extraClassPath: File): Collection<DeclarationDescriptor> =
DescriptorUtils.getAllDescriptors(analyzeFileToPackageView(*extraClassPath).memberScope)
private fun doTestBrokenLibrary(libraryName: String, vararg pathsToDelete: String) {
private fun doTestBrokenLibrary(libraryName: String, vararg pathsToDelete: String, additionalOptions: List<String> = emptyList()) {
// This function compiles a library, then deletes one class file and attempts to compile a Kotlin source against
// this broken library. The expected result is an error message from the compiler
val library = copyJarFileWithoutEntry(compileLibrary(libraryName), *pathsToDelete)
compileKotlin("source.kt", tmpdir, listOf(library))
compileKotlin("source.kt", tmpdir, listOf(library), additionalOptions = additionalOptions)
}
private fun doTestKotlinLibraryWithWrongMetadataVersion(
@@ -215,6 +215,10 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
doTestBrokenLibrary("library", "a/A\$Anno.class")
}
fun testMissingDependencyNestedAnnotationIr() {
doTestBrokenLibrary("library", "a/A\$Anno.class", additionalOptions = listOf("-Xuse-ir"))
}
fun testMissingDependencyConflictingLibraries() {
val library1 = copyJarFileWithoutEntry(
compileLibrary("library1"),