Fix rendering of type aliases
- render 'actual' modifier if it's present - do not render a space after type parameter list
This commit is contained in:
+3
-3
@@ -104,6 +104,6 @@ public final actual annotation class Foo6 : kotlin.Annotation {
|
|||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
}
|
}
|
||||||
public typealias Foo1 = Bar1
|
public actual typealias Foo1 = Bar1
|
||||||
public typealias Foo4 = Bar2
|
public actual typealias Foo4 = Bar2
|
||||||
public typealias Foo7 = Bar2
|
public actual typealias Foo7 = Bar2
|
||||||
|
|||||||
+2
-2
@@ -149,5 +149,5 @@ public open class JavaFoo {
|
|||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
}
|
}
|
||||||
public typealias Bar3 = JavaBar
|
public actual typealias Bar3 = JavaBar
|
||||||
public typealias Foo3 = JavaFoo
|
public actual typealias Foo3 = JavaFoo
|
||||||
|
|||||||
+1
-1
@@ -36,4 +36,4 @@ public open class JavaBar {
|
|||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
}
|
}
|
||||||
public typealias Bar = JavaBar
|
public actual typealias Bar = JavaBar
|
||||||
|
|||||||
Vendored
+10
-10
@@ -65,14 +65,14 @@ public expect interface C9</*0*/ K> {
|
|||||||
// -- Module: <m2-jvm> --
|
// -- Module: <m2-jvm> --
|
||||||
package
|
package
|
||||||
|
|
||||||
public typealias C1 = kotlin.String
|
public actual typealias C1 = kotlin.String
|
||||||
public typealias C10</*0*/ L> = Tmp<L>
|
public actual typealias C10</*0*/ L> = Tmp<L>
|
||||||
public typealias C2</*0*/ A> = kotlin.collections.List<kotlin.String>
|
public actual typealias C2</*0*/ A> = kotlin.collections.List<kotlin.String>
|
||||||
public typealias C3</*0*/ B> = kotlin.collections.List<B>
|
public actual typealias C3</*0*/ B> = kotlin.collections.List<B>
|
||||||
public typealias C4</*0*/ D, /*1*/ E> = kotlin.collections.MutableMap<D, E>
|
public actual typealias C4</*0*/ D, /*1*/ E> = kotlin.collections.MutableMap<D, E>
|
||||||
public typealias C5</*0*/ F, /*1*/ G> = kotlin.collections.MutableMap<G, F>
|
public actual typealias C5</*0*/ F, /*1*/ G> = kotlin.collections.MutableMap<G, F>
|
||||||
public typealias C6</*0*/ H> = kotlin.collections.MutableList<H>
|
public actual typealias C6</*0*/ H> = kotlin.collections.MutableList<H>
|
||||||
public typealias C7</*0*/ I> = kotlin.collections.MutableList<out I>
|
public actual typealias C7</*0*/ I> = kotlin.collections.MutableList<out I>
|
||||||
public typealias C8</*0*/ J> = kotlin.collections.MutableList<*>
|
public actual typealias C8</*0*/ J> = kotlin.collections.MutableList<*>
|
||||||
public typealias C9</*0*/ K> = kotlin.collections.MutableList<in K>
|
public actual typealias C9</*0*/ K> = kotlin.collections.MutableList<in K>
|
||||||
public typealias Tmp</*0*/ K> = kotlin.collections.MutableList<K>
|
public typealias Tmp</*0*/ K> = kotlin.collections.MutableList<K>
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ public open class FooImpl {
|
|||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
}
|
}
|
||||||
public typealias Foo = FooImpl
|
public actual typealias Foo = FooImpl
|
||||||
|
|||||||
@@ -19,4 +19,4 @@ public open class FooImpl {
|
|||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
}
|
}
|
||||||
public typealias Foo = FooImpl
|
public actual typealias Foo = FooImpl
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ expect class C3<D, E : D>
|
|||||||
^
|
^
|
||||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:18:16: error: expected class 'C4' has no actual declaration in module
|
compiler/testData/multiplatform/incompatibleClasses/common.kt:18:16: error: expected class 'C4' has no actual declaration in module
|
||||||
The following declaration is incompatible because upper bounds of type parameters are different:
|
The following declaration is incompatible because upper bounds of type parameters are different:
|
||||||
public typealias C4<F> = C4Impl<F>
|
public actual typealias C4<F> = C4Impl<F>
|
||||||
|
|
||||||
expect class C4<F>
|
expect class C4<F>
|
||||||
^
|
^
|
||||||
|
|||||||
@@ -838,10 +838,11 @@ internal class DescriptorRendererImpl(
|
|||||||
private fun renderTypeAlias(typeAlias: TypeAliasDescriptor, builder: StringBuilder) {
|
private fun renderTypeAlias(typeAlias: TypeAliasDescriptor, builder: StringBuilder) {
|
||||||
builder.renderAnnotations(typeAlias)
|
builder.renderAnnotations(typeAlias)
|
||||||
renderVisibility(typeAlias.visibility, builder)
|
renderVisibility(typeAlias.visibility, builder)
|
||||||
|
renderMemberModifiers(typeAlias, builder)
|
||||||
builder.append(renderKeyword("typealias")).append(" ")
|
builder.append(renderKeyword("typealias")).append(" ")
|
||||||
renderName(typeAlias, builder)
|
renderName(typeAlias, builder)
|
||||||
|
|
||||||
renderTypeParameters(typeAlias.declaredTypeParameters, builder, true)
|
renderTypeParameters(typeAlias.declaredTypeParameters, builder, false)
|
||||||
renderCapturedTypeParametersIfRequired(typeAlias, builder)
|
renderCapturedTypeParametersIfRequired(typeAlias, builder)
|
||||||
|
|
||||||
builder.append(" = ").append(renderType(typeAlias.underlyingType))
|
builder.append(" = ").append(renderType(typeAlias.underlyingType))
|
||||||
|
|||||||
Reference in New Issue
Block a user