Adjust testData: get rid of obsolete annotations

This commit is contained in:
Denis Zharkov
2015-06-09 20:30:52 +03:00
parent 053dcf3abf
commit c9f79c2d05
193 changed files with 322 additions and 322 deletions
@@ -18,7 +18,7 @@ fun box() : String {
if( 1.(fun Int.(i: Int) = i + this)(1) != 2) return "test 6 failed";
if( (fooT1<String>()("mama")) != "mama") return "test 7 failed";
val a = [A] fun Int.() = this + 1
val a = @A fun Int.() = this + 1
if (1.a() != 2) return "test 8 failed"
val b = ( fun Int.() = this + 1)
if (1.b() != 2) return "test 9 failed"
@@ -18,7 +18,7 @@ fun box() : String {
if( 1.(fun Int.name(i: Int) = i + this)(1) != 2) return "test 6 failed";
if( (fooT1<String>()("mama")) != "mama") return "test 7 failed";
val a = [A] fun Int.name() = this + 1 // name
val a = @A fun Int.name() = this + 1 // name
if (1.a() != 2) return "test 8 failed"
val b = ( fun Int.name() = this + 1)
if (1.b() != 2) return "test 9 failed"
+1 -1
View File
@@ -3,7 +3,7 @@ package t
class Reproduce {
fun test(): String {
[data] class Foo(val bar: String, val baz: Int)
@data class Foo(val bar: String, val baz: Int)
val foo = Foo("OK", 5)
return foo.bar
}
@@ -1,9 +1,9 @@
annotation class Anno
[Anno] val Int.foo: Int
@Anno val Int.foo: Int
get() = this
[Anno] val String.foo: Int
@Anno val String.foo: Int
get() = 42
fun box() = if (42.foo == 42 && "OK".foo == 42) "OK" else "Fail"
+1 -1
View File
@@ -4,7 +4,7 @@ enum class MyEnum {
K;
//TODO: KT-4693
[inline] fun <T> doSmth(a: T) : String {
@inline fun <T> doSmth(a: T) : String {
return a.toString() + K.name()
}
}
@@ -1,5 +1,5 @@
class C<T> {
[kotlin.jvm.jvmOverloads] public fun foo(o: T, k: String = "K"): String = o.toString() + k
@kotlin.jvm.jvmOverloads public fun foo(o: T, k: String = "K"): String = o.toString() + k
}
fun box(): String {
@@ -1,5 +1,5 @@
class C {
[kotlin.jvm.jvmOverloads] public fun foo(o: String = "O", k: String = "K"): String = o + k
@kotlin.jvm.jvmOverloads public fun foo(o: String = "O", k: String = "K"): String = o + k
}
fun box(): String {
@@ -9,12 +9,12 @@ Retention(RetentionPolicy.RUNTIME)
annotation class Second(val value: String)
enum class E {
[First]
@First
E1 {
fun foo() = "something"
}
[Second("OK")]
@Second("OK")
E2
}
@@ -23,7 +23,7 @@ fun testClass(clazz: Class<*>, name: String) {
}
fun box(): String {
testClass(foo0([Ann("OK")] { }), "1")
testClass(foo0(@Ann("OK") { }), "1")
testClass(foo0( @Ann("OK") { }), "2")
testClass(foo0() @Ann("OK") { }, "3")
@@ -5,7 +5,7 @@ annotation class First
class MyClass() {
public var x: String by Delegate()
[First] set
@First set
}
class Delegate {
@@ -2,9 +2,9 @@ import kotlin.platform.platformName
import kotlin.reflect.jvm.*
var state: String = "value"
[platformName("getter")]
@platformName("getter")
get
[platformName("setter")]
@platformName("setter")
set
fun box(): String {
@@ -1,27 +1,27 @@
class C {
companion object {
val defaultGetter: Int = 1
[native] get
@native get
var defaultSetter: Int = 1
[native] get
[native] set
@native get
@native set
}
val defaultGetter: Int = 1
[native] get
@native get
var defaultSetter: Int = 1
[native] get
[native] set
@native get
@native set
}
val defaultGetter: Int = 1
[native] get
@native get
var defaultSetter: Int = 1
[native] get
[native] set
@native get
@native set
fun check(body: () -> Unit, signature: String): String? {
try {
@@ -1,6 +1,6 @@
class C {
companion object {
[kotlin.platform.platformStatic] [kotlin.jvm.jvmOverloads] public fun foo(o: String, k: String = "K"): String {
@kotlin.platform.platformStatic @kotlin.jvm.jvmOverloads public fun foo(o: String, k: String = "K"): String {
return o + k
}
}
@@ -1,5 +1,5 @@
class C {
[kotlin.jvm.jvmOverloads] public fun foo(o: String = "O", i1: Int, k: String = "K", i2: Int): String {
@kotlin.jvm.jvmOverloads public fun foo(o: String = "O", i1: Int, k: String = "K", i2: Int): String {
return o + k
}
}
@@ -1,5 +1,5 @@
class C {
[kotlin.jvm.jvmOverloads] public fun foo(d1: Double, d2: Double, status: String = "OK"): String {
@kotlin.jvm.jvmOverloads public fun foo(d1: Double, d2: Double, status: String = "OK"): String {
return if (d1 + d2 == 3.0) status else "fail"
}
}
@@ -1,7 +1,7 @@
class C {
}
[kotlin.jvm.jvmOverloads] fun C.foo(o: String, k: String = "K"): String {
@kotlin.jvm.jvmOverloads fun C.foo(o: String, k: String = "K"): String {
return o + k
}
@@ -1,5 +1,5 @@
class C {
[kotlin.jvm.jvmOverloads] public fun foo(o: String = "O", k: String = "K"): String {
@kotlin.jvm.jvmOverloads public fun foo(o: String = "O", k: String = "K"): String {
return o + k
}
}
@@ -1,5 +1,5 @@
class C {
[kotlin.jvm.jvmOverloads] public fun foo(o: String, k: String = "K"): String {
@kotlin.jvm.jvmOverloads public fun foo(o: String, k: String = "K"): String {
return o + k
}
}
@@ -1,4 +1,4 @@
class C [kotlin.jvm.jvmOverloads] (s1: String, s2: String = "K") {
class C @kotlin.jvm.jvmOverloads constructor(s1: String, s2: String = "K") {
public val status: String = s1 + s2
}
@@ -1,7 +1,7 @@
class C(val i: Int) {
var status = "fail"
[kotlin.jvm.jvmOverloads] constructor(o: String, k: String = "K"): this(-1) {
@kotlin.jvm.jvmOverloads constructor(o: String, k: String = "K"): this(-1) {
status = o + k
}
}
@@ -1,5 +1,5 @@
class C {
[kotlin.jvm.jvmOverloads] public fun foo(s: String = "OK"): String {
@kotlin.jvm.jvmOverloads public fun foo(s: String = "OK"): String {
return s
}
}
@@ -1,6 +1,6 @@
import kotlin.platform.*
[platformName("bar")]
@platformName("bar")
fun foo() = "foo"
fun box(): String {
@@ -2,7 +2,7 @@ import kotlin.platform.*
fun <T> List<T>.foo() = "foo"
[platformName("fooInt")]
@platformName("fooInt")
fun List<Int>.foo() = "fooInt"
fun box(): String {
@@ -1,6 +1,6 @@
import kotlin.platform.*
[platformName("bar")]
@platformName("bar")
fun foo() = "foo"
fun box(): String {
@@ -1,9 +1,9 @@
import kotlin.platform.*
var v: Int = 1
[platformName("vget")]
@platformName("vget")
get
[platformName("vset")]
@platformName("vset")
set
fun box(): String {
@@ -5,10 +5,10 @@ object A {
platformStatic var a: Int = 1
var b: Int = 1
[platformStatic] get
@platformStatic get
var c: Int = 1
[platformStatic] set
@platformStatic set
}
@@ -5,10 +5,10 @@ object A {
platformStatic var a: Int = 1
var b: Int = 1
[platformStatic] get
@platformStatic get
var c: Int = 1
[platformStatic] set
@platformStatic set
}
@@ -12,10 +12,10 @@ object A {
platformStatic var a: Int = 1
var b: Int = 1
[platformStatic] get
@platformStatic get
var c: Int = 1
[platformStatic] set
@platformStatic set
}
@@ -7,7 +7,7 @@ open class B
class A {
companion object {
[platformStatic]
@platformStatic
fun <T: B> a(s: T) : T {
return s
}
@@ -3,6 +3,6 @@ import java.lang.annotation.*
Retention(RetentionPolicy.RUNTIME) annotation class SomeAnnotation(val value: String)
class A {
[SomeAnnotation("OK")] val property: Int
@SomeAnnotation("OK") val property: Int
get() = 42
}
@@ -3,5 +3,5 @@ import java.lang.annotation.*
Retention(RetentionPolicy.RUNTIME) annotation class SomeAnnotation(val value: String)
interface T {
[SomeAnnotation("OK")] val property: Int
@SomeAnnotation("OK") val property: Int
}
@@ -2,5 +2,5 @@ import java.lang.annotation.*
Retention(RetentionPolicy.RUNTIME) annotation class SomeAnnotation(val value: String)
[SomeAnnotation("OK")] val property: Int
@SomeAnnotation("OK") val property: Int
get() = 42