Minor. removed functions which declared in Standard.kt from diagnostic testdata.

Removed declaration for functions: TODO, run, with, apply, let.
This commit is contained in:
Stanislav Erokhin
2016-01-24 13:15:37 +03:00
parent d7438d9f2b
commit 298a075381
135 changed files with 3 additions and 222 deletions
@@ -15,4 +15,3 @@ fun test(bal: Array<Int>) {
val d = run { bar += 4 }
checkSubtype<Unit>(d)
}
fun <T> run(f: () -> T): T = f()
@@ -1,4 +1,3 @@
package
public fun </*0*/ T> run(/*0*/ f: () -> T): T
public fun test(/*0*/ bal: kotlin.Array<kotlin.Int>): kotlin.Unit
@@ -13,4 +13,3 @@ fun test(bal: Array<Int>) {
val <!UNUSED_VARIABLE!>f<!>: Int = run { <!ASSIGNMENT_TYPE_MISMATCH!>bar += 4<!> }
}
fun <T> run(f: () -> T): T = f()
@@ -1,4 +1,3 @@
package
public fun </*0*/ T> run(/*0*/ f: () -> T): T
public fun test(/*0*/ bal: kotlin.Array<kotlin.Int>): kotlin.Unit
@@ -19,5 +19,4 @@ fun main(args: Array<String>) {
foo2 { println ("foo2")} // prints "foo2"
}
fun <T> run(f: () -> T) : T = f()
fun println(s: String) = s
@@ -5,5 +5,4 @@ package bug {
public fun foo2(/*0*/ bar: () -> kotlin.Unit): kotlin.Unit
public fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
public fun println(/*0*/ s: kotlin.String): kotlin.String
public fun </*0*/ T> run(/*0*/ f: () -> T): T
}
@@ -6,6 +6,5 @@ fun main(args : Array<String>) {
a?.let { list += it }
}
fun <T : Any, R> T.let(f: (T) -> R): R = f(this)
operator fun <T> Iterable<T>.plus(<!UNUSED_PARAMETER!>element<!>: T): List<T> = null!!
fun <T> listOf(vararg <!UNUSED_PARAMETER!>values<!>: T): List<T> = null!!
@@ -2,5 +2,4 @@ package
public fun </*0*/ T> listOf(/*0*/ vararg values: T /*kotlin.Array<out T>*/): kotlin.collections.List<T>
public fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
public fun </*0*/ T : kotlin.Any, /*1*/ R> T.let(/*0*/ f: (T) -> R): R
public operator fun </*0*/ T> kotlin.collections.Iterable<T>.plus(/*0*/ element: T): kotlin.collections.List<T>
@@ -4,5 +4,3 @@ fun test2() {
val x = run f@{return@f 1}
checkSubtype<Int>(x)
}
fun <T> run(f: () -> T): T { return f() }
@@ -1,4 +1,3 @@
package
public fun </*0*/ T> run(/*0*/ f: () -> T): T
public fun test2(): kotlin.Unit
@@ -10,5 +10,3 @@ fun test1() {
val x = run(l@{return@l 1})
checkSubtype<Int>(x)
}
fun <T> run(f: () -> T): T { return f() }
@@ -1,5 +1,4 @@
package
public fun </*0*/ T> run(/*0*/ f: () -> T): T
public fun test(): kotlin.Unit
public fun test1(): kotlin.Unit
@@ -1,9 +1,7 @@
// !CHECK_TYPE
fun test() {
run1 f@{
run f@{
<!UNREACHABLE_CODE!>checkSubtype<Nothing>(<!>return@f 1<!UNREACHABLE_CODE!>)<!>
}
}
fun <T> run1(f: () -> T): T { return f() }
@@ -1,4 +1,3 @@
package
public fun </*0*/ T> run1(/*0*/ f: () -> T): T
public fun test(): kotlin.Unit
@@ -10,5 +10,3 @@ fun test() {
}
checkSubtype<Int>(x)
}
fun <T> run(f: () -> T): T { return f() }
@@ -1,4 +1,3 @@
package
public fun </*0*/ T> run(/*0*/ f: () -> T): T
public fun test(): kotlin.Unit
@@ -9,5 +9,3 @@ fun test() {
}
checkSubtype<Int>(x)
}
fun <T> run(f: () -> T): T { return f() }
@@ -1,4 +1,3 @@
package
public fun </*0*/ T> run(/*0*/ f: () -> T): T
public fun test(): kotlin.Unit
@@ -4,5 +4,3 @@ fun test(a: Int) {
else return@f <!RETURN_TYPE_MISMATCH!>1<!>
}
}
fun <T> run(f: () -> T): T { return f() }
@@ -1,4 +1,3 @@
package
public fun </*0*/ T> run(/*0*/ f: () -> T): T
public fun test(/*0*/ a: kotlin.Int): kotlin.Unit
@@ -7,5 +7,3 @@ fun test(a: Int) {
}
checkSubtype<Unit>(x)
}
fun <T> run(f: () -> T): T { return f() }
@@ -1,4 +1,3 @@
package
public fun </*0*/ T> run(/*0*/ f: () -> T): T
public fun test(/*0*/ a: kotlin.Int): kotlin.Unit
@@ -1,5 +1,4 @@
val flag = true
fun <T> run(f: () -> T): T { return f() }
// type of a was checked by txt
val a = run { // () -> Unit
@@ -4,4 +4,3 @@ public val a: kotlin.Unit
public val b: kotlin.Unit
public val c: kotlin.Unit
public val flag: kotlin.Boolean = true
public fun </*0*/ T> run(/*0*/ f: () -> T): T
@@ -7,5 +7,3 @@ fun test(a: Int) {
run<Int>{ <!TYPE_MISMATCH!>""<!> }
run<Int>{ 1 }
}
fun <T> run(f: () -> T): T { return f() }
@@ -1,4 +1,3 @@
package
public fun </*0*/ T> run(/*0*/ f: () -> T): T
public fun test(/*0*/ a: kotlin.Int): kotlin.Unit
@@ -12,5 +12,3 @@ fun test(a: C, b: B) {
}
checkSubtype<A>(x)
}
fun <T> run(f: () -> T): T { return f() }
@@ -1,6 +1,5 @@
package
public fun </*0*/ T> run(/*0*/ f: () -> T): T
public fun test(/*0*/ a: C, /*1*/ b: B): kotlin.Unit
public interface A {