Fix tests with type annotations

This commit is contained in:
Svetlana Isakova
2015-10-17 15:48:38 +03:00
parent fafca76ac5
commit 7208efc784
4 changed files with 27 additions and 7 deletions
@@ -1,6 +1,15 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER
class A
fun <!UNRESOLVED_REFERENCE!>@x<!> A.foo(a: <!UNRESOLVED_REFERENCE!>@x<!> Int) {
val v: <!UNRESOLVED_REFERENCE!>@x<!> Int = 1
}
@Target(AnnotationTarget.TYPE)
annotation class x
fun @x A.foo(a: @x Int) {
val v: @x Int = 1
}
fun <T> @x List<@x T>.foo(l: List<@x T>): @x List<@x T> = throw Exception()
fun <T, U: T> List<@x T>.firstTyped(): U = throw Exception()
val <T> @x List<@x T>.f: Int get() = 42
@@ -1,6 +1,9 @@
package
public fun @[ERROR : x]() A.foo(/*0*/ a: @[ERROR : x]() kotlin.Int): kotlin.Unit
public val </*0*/ T> @x() kotlin.List<@x() T>.f: kotlin.Int
public fun </*0*/ T, /*1*/ U : T> kotlin.List<@x() T>.firstTyped(): U
public fun @x() A.foo(/*0*/ a: @x() kotlin.Int): kotlin.Unit
public fun </*0*/ T> @x() kotlin.List<@x() T>.foo(/*0*/ l: kotlin.List<@x() T>): @x() kotlin.List<@x() T>
public final class A {
public constructor A()
@@ -8,3 +11,10 @@ public final class A {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE}) @kotlin.annotation.annotation() public final class x : kotlin.Annotation {
public constructor x()
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
}