Do not add container annotaions to type artificially
It was only used for type-related nullability/mutability annotations and it was necessary to remove them in the descriptor renderer (duplicating their fqnames there). At the same time they're only needed for types enhancement where they can be simply restored from type owners' descriptors The testData changes are more or less correct: this kind of annotations is bound both to types themselves and their use because of their targets
This commit is contained in:
+2
-3
@@ -25,7 +25,6 @@ import org.jetbrains.kotlin.descriptors.impl.PackageFragmentDescriptorImpl
|
||||
import org.jetbrains.kotlin.incremental.components.LookupLocation
|
||||
import org.jetbrains.kotlin.jvm.compiler.ExpectedLoadErrorsUtil
|
||||
import org.jetbrains.kotlin.jvm.compiler.LoadDescriptorUtil
|
||||
import org.jetbrains.kotlin.load.java.ANNOTATIONS_COPIED_TO_TYPES
|
||||
import org.jetbrains.kotlin.load.java.descriptors.JavaClassDescriptor
|
||||
import org.jetbrains.kotlin.load.java.structure.reflect.classId
|
||||
import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader
|
||||
@@ -55,9 +54,9 @@ abstract class AbstractJvmRuntimeDescriptorLoaderTest : TestCaseWithTmpdir() {
|
||||
companion object {
|
||||
private val renderer = DescriptorRenderer.withOptions {
|
||||
withDefinedIn = false
|
||||
excludedAnnotationClasses = (listOf(
|
||||
excludedAnnotationClasses = setOf(
|
||||
FqName(ExpectedLoadErrorsUtil.ANNOTATION_CLASS_NAME)
|
||||
) + ANNOTATIONS_COPIED_TO_TYPES).toSet()
|
||||
)
|
||||
overrideRenderingPolicy = OverrideRenderingPolicy.RENDER_OPEN_OVERRIDE
|
||||
parameterNameRenderingPolicy = ParameterNameRenderingPolicy.NONE
|
||||
includePropertyConstant = false
|
||||
|
||||
Reference in New Issue
Block a user