FIR checker: reproduce a false alarm on type mismatch of overridden property

This commit is contained in:
Jinseong Jeon
2021-02-03 15:02:57 -08:00
committed by Dmitriy Novozhilov
parent 64c5608f31
commit 065d0c66ab
5 changed files with 96 additions and 0 deletions
@@ -0,0 +1,21 @@
interface ClassId
interface JavaAnnotation {
val classId: ClassId?
}
interface JavaAnnotationOwner {
val annotations: Collection<JavaAnnotation>
}
interface MapBasedJavaAnnotationOwner : JavaAnnotationOwner {
val annotationsByFqNameHash: Map<Int?, JavaAnnotation>
}
fun JavaAnnotationOwner.buildLazyValueForMap() = lazy {
annotations.associateBy { it.classId?.hashCode() }
}
abstract class BinaryJavaMethodBase(): MapBasedJavaAnnotationOwner {
override val annotationsByFqNameHash by buildLazyValueForMap()
}