Union type attributes for common super type calculation

This commit is contained in:
Irene Dea
2021-10-13 14:37:31 -07:00
committed by Dmitriy Novozhilov
parent db471ca61e
commit 56d817b49f
11 changed files with 44 additions and 150 deletions
@@ -133,6 +133,10 @@ interface TypeSystemCommonSuperTypesContext : TypeSystemContext, TypeSystemTypeF
* Used only in FIR
*/
fun TypeConstructorMarker.toErrorType(): SimpleTypeMarker
fun unionTypeAttributes(types: List<KotlinTypeMarker>): List<AnnotationMarker> = emptyList()
fun KotlinTypeMarker.replaceTypeAttributes(newAttributes: List<AnnotationMarker>): KotlinTypeMarker = this
}
// This interface is only used to declare that implementing class is supposed to be used as a TypeSystemInferenceExtensionContext component
@@ -494,7 +498,7 @@ interface TypeSystemContext : TypeSystemOptimizationContext {
fun SimpleTypeMarker.isPrimitiveType(): Boolean
fun KotlinTypeMarker.getAnnotations(): List<AnnotationMarker>
fun KotlinTypeMarker.getAttributes(): List<AnnotationMarker>
fun substitutionSupertypePolicy(type: SimpleTypeMarker): TypeCheckerState.SupertypesPolicy