Check for repeated annotations in type alias expansion.
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class A
|
||||
|
||||
typealias AInt = @A Int
|
||||
typealias AI = AInt
|
||||
|
||||
typealias Test1 = <!REPEATED_ANNOTATION!>@A<!> AInt
|
||||
typealias Test2 = <!REPEATED_ANNOTATION!>@A<!> AI
|
||||
typealias Test3 = List<<!REPEATED_ANNOTATION!>@A<!> AInt>
|
||||
typealias Test4 = List<<!REPEATED_ANNOTATION!>@A<!> AI>
|
||||
|
||||
val testProperty1: <!REPEATED_ANNOTATION!>@A<!> AInt = 0
|
||||
val testProperty2: <!REPEATED_ANNOTATION!>@A<!> AI = 0
|
||||
|
||||
fun testFunction1(x: <!REPEATED_ANNOTATION!>@A<!> AInt): <!REPEATED_ANNOTATION!>@A<!> AInt = x
|
||||
fun testFunction2(x: <!REPEATED_ANNOTATION!>@A<!> AI): <!REPEATED_ANNOTATION!>@A<!> AI = x
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package
|
||||
|
||||
public val testProperty1: @A AInt /* = @A @A kotlin.Int */ = 0
|
||||
public val testProperty2: @A AI /* = @A @A kotlin.Int */ = 0
|
||||
public fun testFunction1(/*0*/ x: @A AInt /* = @A @A kotlin.Int */): @A AInt /* = @A @A kotlin.Int */
|
||||
public fun testFunction2(/*0*/ x: @A AI /* = @A @A kotlin.Int */): @A AI /* = @A @A kotlin.Int */
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE}) public final annotation class A : kotlin.Annotation {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
public typealias AI = AInt
|
||||
public typealias AInt = @A kotlin.Int
|
||||
public typealias Test1 = @A AInt
|
||||
public typealias Test2 = @A AI
|
||||
public typealias Test3 = kotlin.collections.List<@A AInt>
|
||||
public typealias Test4 = kotlin.collections.List<@A AI>
|
||||
@@ -14,8 +14,3 @@ fun test2(a: Alias3) = a
|
||||
|
||||
typealias LA1 = List<@Ann2 Alias1>
|
||||
fun test3(la1: LA1) = la1
|
||||
|
||||
// see KT-14318
|
||||
typealias AliasRepeated = @Ann1 Alias1
|
||||
fun test4(a: AliasRepeated) = a
|
||||
fun test4a(a: @Ann1 Alias1) = a
|
||||
@@ -3,8 +3,6 @@ package
|
||||
public fun test1(/*0*/ a: Alias2 /* = @Ann2 @Ann1 kotlin.String */): Alias2 /* = @Ann2 @Ann1 kotlin.String */
|
||||
public fun test2(/*0*/ a: Alias3 /* = @kotlin.ExtensionFunctionType @Ann1 kotlin.String */): Alias3 /* = @kotlin.ExtensionFunctionType @Ann1 kotlin.String */
|
||||
public fun test3(/*0*/ la1: LA1 /* = kotlin.collections.List<@Ann2 Alias1 /* = @Ann2 @Ann1 kotlin.String */> */): LA1 /* = kotlin.collections.List<@Ann2 Alias1 /* = @Ann2 @Ann1 kotlin.String */> */
|
||||
public fun test4(/*0*/ a: AliasRepeated /* = @Ann1 @Ann1 kotlin.String */): AliasRepeated /* = @Ann1 @Ann1 kotlin.String */
|
||||
public fun test4a(/*0*/ a: @Ann1 Alias1 /* = @Ann1 @Ann1 kotlin.String */): @Ann1 Alias1 /* = @Ann1 @Ann1 kotlin.String */
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE}) public final annotation class Ann1 : kotlin.Annotation {
|
||||
public constructor Ann1()
|
||||
@@ -22,5 +20,4 @@ public fun test4a(/*0*/ a: @Ann1 Alias1 /* = @Ann1 @Ann1 kotlin.String */): @Ann
|
||||
public typealias Alias1 = @Ann1 kotlin.String
|
||||
public typealias Alias2 = @Ann2 Alias1
|
||||
public typealias Alias3 = @kotlin.ExtensionFunctionType Alias1
|
||||
public typealias AliasRepeated = @Ann1 Alias1
|
||||
public typealias LA1 = kotlin.collections.List<@Ann2 Alias1>
|
||||
|
||||
Reference in New Issue
Block a user