Fixes and refactors

This commit is contained in:
Irene Dea
2021-10-21 13:22:51 -07:00
committed by Dmitriy Novozhilov
parent 2e2e70fede
commit 19bfc43bee
70 changed files with 263 additions and 327 deletions
@@ -286,7 +286,7 @@ open class IrBasedTypeParameterDescriptor(owner: IrTypeParameter) : TypeParamete
private val _defaultType: SimpleType by lazy {
KotlinTypeFactory.simpleTypeWithNonTrivialMemberScope(
Annotations.EMPTY, typeConstructor, emptyList(), false,
TypeAttributes.Empty, typeConstructor, emptyList(), false,
LazyScopeAdapter {
TypeIntersectionScope.create(
"Scope for type parameter " + name.asString(),
@@ -405,8 +405,8 @@ class IrBuiltInsOverDescriptors(
override val checkNotNullSymbol = defineCheckNotNullOperator()
private fun TypeConstructor.makeNonNullType() = KotlinTypeFactory.simpleType(Annotations.EMPTY, this, listOf(), false)
private fun TypeConstructor.makeNullableType() = KotlinTypeFactory.simpleType(Annotations.EMPTY, this, listOf(), true)
private fun TypeConstructor.makeNonNullType() = KotlinTypeFactory.simpleType(TypeAttributes.Empty, this, listOf(), false)
private fun TypeConstructor.makeNullableType() = KotlinTypeFactory.simpleType(TypeAttributes.Empty, this, listOf(), true)
override val dataClassArrayMemberHashCodeSymbol = defineOperator("dataClassArrayMemberHashCode", intType, listOf(anyType))
@@ -406,6 +406,11 @@ interface IrTypeSystemContext : TypeSystemContext, TypeSystemCommonSuperTypesCon
return this.annotations.map { object : AnnotationMarker, IrElement by it {} }
}
override fun KotlinTypeMarker.getCustomAttributes(): List<AnnotationMarker> {
require(this is IrType)
return emptyList()
}
override fun createErrorType(debugName: String): SimpleTypeMarker {
TODO("IrTypeSystemContext doesn't support constraint system resolution")
}