Add explicit return types to several test data files so that AST access is not needed
Test cases are chosen so that addition/removal of explicit type will not interfere with the original purpose of the test
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
class ClassParamUsedInFun<in T> {
|
||||
fun f(t: T) = 1
|
||||
fun f(t: T): Int = 1
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
class ClassParamUsedInFun<T> {
|
||||
fun f(t: T) = 1
|
||||
fun f(t: T): Int = 1
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ trait T {
|
||||
}
|
||||
|
||||
class A : T {
|
||||
override fun foo() = 42
|
||||
override fun foo(): Int = 42
|
||||
|
||||
class object : T by A()
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun <T> f() = 1
|
||||
fun <T> f(): Int = 1
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun <P> funParamParam(a: Int, b: P) = 1
|
||||
fun <P> funParamParam(a: Int, b: P): Int = 1
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun <P> funParamParam(a: Int, b: P) = 1
|
||||
fun <P> funParamParam(a: Int, b: P): Int = 1
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun <P, Q : P> funParamReferencesParam() = 1
|
||||
fun <P, Q : P> funParamReferencesParam(): Int = 1
|
||||
|
||||
+1
-1
@@ -3,6 +3,6 @@ package test
|
||||
trait Foo
|
||||
trait Bar
|
||||
|
||||
fun <T> foo()
|
||||
fun <T> foo(): Unit
|
||||
where T : Foo, T : Bar
|
||||
= Unit.VALUE
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun <A : java.lang.Number> uno() = 1
|
||||
fun <A : java.lang.Number> uno(): Int = 1
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun <A> tres() where A : java.lang.Number, A : java.io.Serializable = 1
|
||||
fun <A> tres(): Int where A : java.lang.Number, A : java.io.Serializable = 1
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun <A : java.io.Serializable> dos() = 1
|
||||
fun <A : java.io.Serializable> dos(): Int = 1
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun <P> funParamVarargParam(a: Int, vararg b: P) = 1
|
||||
fun <P> funParamVarargParam(a: Int, vararg b: P): Int = 1
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun <P, Q> funTwoTypeParams() = 1
|
||||
fun <P, Q> funTwoTypeParams(): Int = 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
class River {
|
||||
fun song() = 1
|
||||
fun song(): Int = 1
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
class ClassFunGetFoo {
|
||||
fun getFoo() = 1
|
||||
fun getFoo(): Int = 1
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
|
||||
class ClassFunGetFoo {
|
||||
fun getFoo() = 1
|
||||
fun getFoo(): Int = 1
|
||||
fun setFoo(p: Int) {}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun Int.shuffle() = 1
|
||||
fun Int.shuffle(): Int = 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
class ExtFunInClass {
|
||||
fun Int.shuffle() = 1
|
||||
fun Int.shuffle(): Int = 1
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun funDefaultArg(p: Int, q: Int = 17, r: Int = 18) = 19
|
||||
fun funDefaultArg(p: Int, q: Int = 17, r: Int = 18): Int = 19
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun fff(a: java.lang.Integer) = 1
|
||||
fun fff(a: java.lang.Integer): Int = 1
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun varargInt(a: Int, vararg b: Int) = 1
|
||||
fun varargInt(a: Int, vararg b: Int): Int = 1
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun varargCharSequence(a: Int, vararg b: java.lang.Integer) = 1
|
||||
fun varargCharSequence(a: Int, vararg b: java.lang.Integer): Int = 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
open class ModifierOpen {
|
||||
open fun abs() = 1
|
||||
open fun abs(): Int = 1
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun f() = 1
|
||||
fun f(): Int = 1
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
fun getFoo() = 1
|
||||
fun getFoo(): Int = 1
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package test
|
||||
|
||||
class ClassVar() {
|
||||
var property1 = 1
|
||||
var property1: Int = 1
|
||||
|
||||
internal var property2 = 1
|
||||
internal var property2: Int = 1
|
||||
|
||||
private var property3 = Object()
|
||||
private var property3: Object = Object()
|
||||
|
||||
protected var property4: String = ""
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package test
|
||||
|
||||
open class ClassVarModality() {
|
||||
open var property1 = 1
|
||||
open var property1: Int = 1
|
||||
|
||||
final internal var property2 = 1
|
||||
final internal var property2: Int = 1
|
||||
|
||||
open var property3 = 1
|
||||
open var property3: Int = 1
|
||||
private set
|
||||
|
||||
final internal var property4 = 1
|
||||
final internal var property4: Int = 1
|
||||
private set
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package test
|
||||
|
||||
class ClassVal() {
|
||||
var property1 = 1
|
||||
var property1: Int = 1
|
||||
get
|
||||
|
||||
internal var property2 = 1
|
||||
internal var property2: Int = 1
|
||||
get
|
||||
|
||||
private var property3 = Object()
|
||||
private var property3: Object = Object()
|
||||
get
|
||||
|
||||
protected var property4: String = ""
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package test
|
||||
|
||||
class ClassVal() {
|
||||
var property1 = 1
|
||||
var property1: Int = 1
|
||||
set
|
||||
|
||||
var property2 = Object()
|
||||
var property2: Object = Object()
|
||||
protected set
|
||||
|
||||
var property3 = Object()
|
||||
var property3: Object = Object()
|
||||
private set
|
||||
|
||||
protected var property4: String = ""
|
||||
|
||||
Reference in New Issue
Block a user