diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyAnnotations.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyAnnotations.kt index 06368a11a2c..f2475e5bc19 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyAnnotations.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyAnnotations.kt @@ -61,7 +61,7 @@ class LazyAnnotations( override fun isEmpty() = annotationEntries.isEmpty() private val annotation = c.storageManager.createMemoizedFunction { entry: KtAnnotationEntry -> - LazyAnnotationDescriptor(c, entry) + c.trace.get(BindingContext.ANNOTATION, entry) ?: LazyAnnotationDescriptor(c, entry) } override fun iterator(): Iterator = annotationEntries.asSequence().map(annotation).iterator()