Add initial type attributes infra

This commit is contained in:
Irene Dea
2021-10-08 17:05:11 -07:00
committed by Dmitriy Novozhilov
parent 62bde2d686
commit fad3c1f2f6
23 changed files with 545 additions and 30 deletions
@@ -57,6 +57,10 @@ class RawTypeImpl private constructor(lowerBound: SimpleType, upperBound: Simple
override fun replaceAnnotations(newAnnotations: Annotations) =
RawTypeImpl(lowerBound.replaceAnnotations(newAnnotations), upperBound.replaceAnnotations(newAnnotations))
override fun replaceAttributes(newAttributes: TypeAttributes) =
RawTypeImpl(lowerBound.replaceAttributes(newAttributes), upperBound.replaceAttributes(newAttributes))
override fun makeNullableAsSpecified(newNullability: Boolean) =
RawTypeImpl(lowerBound.makeNullableAsSpecified(newNullability), upperBound.makeNullableAsSpecified(newNullability))
@@ -253,6 +253,7 @@ internal class NotNullTypeParameterImpl(override val delegate: SimpleType) : Not
}
override fun replaceAnnotations(newAnnotations: Annotations) = NotNullTypeParameterImpl(delegate.replaceAnnotations(newAnnotations))
override fun replaceAttributes(newAttributes: TypeAttributes) = NotNullTypeParameterImpl(delegate.replaceAttributes(newAttributes))
override fun makeNullableAsSpecified(newNullability: Boolean) =
if (newNullability) delegate.makeNullableAsSpecified(true) else this