[FIR/IR generator] Add default arguments to TypeVariable constructor
This commit is contained in:
committed by
Space Team
parent
730f98ba38
commit
bca35c0015
+1
-1
@@ -48,7 +48,7 @@ private class TransformerPrinter(
|
||||
println()
|
||||
val elementParameterName = element.safeDecapitalizedName
|
||||
if (element.isRootElement) {
|
||||
val elementTP = TypeVariable("E", listOf(element), variance = Variance.INVARIANT)
|
||||
val elementTP = TypeVariable("E", listOf(element))
|
||||
printFunctionDeclaration(
|
||||
name = "transformElement",
|
||||
parameters = listOf(
|
||||
|
||||
+1
-1
@@ -160,7 +160,7 @@ private class TypeTransformerPrinter(
|
||||
|
||||
context(ImportCollector)
|
||||
override fun SmartPrinter.printAdditionalMethods() {
|
||||
val typeTP = TypeVariable("Type", listOf(irTypeType.copy(nullable = true)), Variance.INVARIANT)
|
||||
val typeTP = TypeVariable("Type", listOf(irTypeType.copy(nullable = true)))
|
||||
printFunctionDeclaration(
|
||||
name = "transformType",
|
||||
parameters = listOf(
|
||||
|
||||
+2
-2
@@ -283,8 +283,8 @@ fun <Self : ParametrizedTypeRef<Self, PositionTypeParameterRef>> ParametrizedTyp
|
||||
|
||||
class TypeVariable(
|
||||
name: String,
|
||||
val bounds: List<TypeRef>,
|
||||
val variance: Variance,
|
||||
val bounds: List<TypeRef> = emptyList(),
|
||||
val variance: Variance = Variance.INVARIANT,
|
||||
) : NamedTypeParameterRef(name)
|
||||
|
||||
fun <P : TypeParameterRef> KClass<*>.asRef(): ClassRef<P> {
|
||||
|
||||
Reference in New Issue
Block a user