Replace deprecated annotations with modifiers in testData

This commit is contained in:
Denis Zharkov
2015-09-17 13:04:46 +03:00
parent 4850fd10f0
commit 9dada595b6
18 changed files with 39 additions and 35 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
fun test1(str: String): String {
@data class A(val x: Int) {
data class A(val x: Int) {
fun foo() = str
}
return A(0).copy().foo()
@@ -7,7 +7,7 @@ fun test1(str: String): String {
class TestClass(val x: String) {
fun foo(): String {
@data class A(val x: Int) {
data class A(val x: Int) {
fun foo() = this@TestClass.x
}
return A(0).copy().foo()
@@ -18,7 +18,7 @@ fun test2(str: String): String = TestClass(str).foo()
fun test3(str: String): String {
var xx = ""
@data class A(val x: Int) {
data class A(val x: Int) {
fun foo(): String { xx = str; return xx }
}
return A(0).copy().foo()
@@ -27,7 +27,7 @@ fun test3(str: String): String {
fun test4(str: String): String {
var xx = ""
fun bar(s: String): String { xx = s; return xx }
@data class A(val x: Int) {
data class A(val x: Int) {
fun foo(): String = bar(str)
}
return A(0).copy().foo()
+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 -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 -1
View File
@@ -1,5 +1,5 @@
// expected: rv: 2
@inline fun foo(l: (Int) -> Int ): Int {
inline fun foo(l: (Int) -> Int ): Int {
return l(1)
}