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:
-1
@@ -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
@@ -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
|
||||
|
||||
Vendored
-1
@@ -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()
|
||||
compiler/testData/diagnostics/tests/functionLiterals/assignmentOperationInLambdaWithExpectedType.txt
Vendored
-1
@@ -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>
|
||||
|
||||
Vendored
-2
@@ -4,5 +4,3 @@ fun test2() {
|
||||
val x = run f@{return@f 1}
|
||||
checkSubtype<Int>(x)
|
||||
}
|
||||
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
public fun test2(): kotlin.Unit
|
||||
|
||||
Vendored
-2
@@ -10,5 +10,3 @@ fun test1() {
|
||||
val x = run(l@{return@l 1})
|
||||
checkSubtype<Int>(x)
|
||||
}
|
||||
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
Vendored
-1
@@ -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
-3
@@ -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
@@ -1,4 +1,3 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> run1(/*0*/ f: () -> T): T
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
-2
@@ -10,5 +10,3 @@ fun test() {
|
||||
}
|
||||
checkSubtype<Int>(x)
|
||||
}
|
||||
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
-2
@@ -9,5 +9,3 @@ fun test() {
|
||||
}
|
||||
checkSubtype<Int>(x)
|
||||
}
|
||||
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
-2
@@ -4,5 +4,3 @@ fun test(a: Int) {
|
||||
else return@f <!RETURN_TYPE_MISMATCH!>1<!>
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
public fun test(/*0*/ a: kotlin.Int): kotlin.Unit
|
||||
|
||||
-2
@@ -7,5 +7,3 @@ fun test(a: Int) {
|
||||
}
|
||||
checkSubtype<Unit>(x)
|
||||
}
|
||||
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
public fun test(/*0*/ a: kotlin.Int): kotlin.Unit
|
||||
|
||||
Vendored
-1
@@ -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
|
||||
|
||||
Vendored
-1
@@ -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
|
||||
|
||||
Vendored
-2
@@ -7,5 +7,3 @@ fun test(a: Int) {
|
||||
run<Int>{ <!TYPE_MISMATCH!>""<!> }
|
||||
run<Int>{ 1 }
|
||||
}
|
||||
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
public fun test(/*0*/ a: kotlin.Int): kotlin.Unit
|
||||
|
||||
-2
@@ -12,5 +12,3 @@ fun test(a: C, b: B) {
|
||||
}
|
||||
checkSubtype<A>(x)
|
||||
}
|
||||
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user