Check annotations on default property getter/setter

This commit is contained in:
Yan Zhulanow
2016-01-28 18:16:14 +03:00
parent 7e528da00a
commit da7acd5e73
10 changed files with 73 additions and 15 deletions
@@ -0,0 +1,13 @@
interface Test {
@get:JvmStatic
val a: Int
<!INAPPLICABLE_JVM_NAME!>@get:JvmName("1")<!>
val b: Int
<!SYNCHRONIZED_ON_ABSTRACT!>@get:Synchronized<!>
val c: Int
<!WRONG_ANNOTATION_TARGET_WITH_USE_SITE_TARGET!>@get:JvmOverloads<!>
val d: Int
}
@@ -0,0 +1,11 @@
package
public interface Test {
public abstract val a: kotlin.Int
public abstract val b: kotlin.Int
public abstract val c: kotlin.Int
public abstract val d: kotlin.Int
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
}
@@ -86,4 +86,10 @@ class D: AB() {
@JvmName("D_finalFun")
fun finalFun() {}
}
interface Intf {
<!INAPPLICABLE_JVM_NAME!>@get:JvmName("getBar")<!> // no error in IDE
<!INAPPLICABLE_JVM_NAME!>@set:JvmName("setBar")<!> // no error in IDE
var foo: Int
}
@@ -43,3 +43,10 @@ public final class D : AB {
@kotlin.jvm.JvmName(name = "D_openFun") public final override /*1*/ fun openFun(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public interface Intf {
public abstract var foo: kotlin.Int
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
}