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,5 +1,3 @@
|
||||
fun <T> run(block: () -> T) : T = block()
|
||||
|
||||
fun test1() {
|
||||
run {
|
||||
if (true) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> run(/*0*/ block: () -> T): T
|
||||
public fun test1(): kotlin.Unit
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
fun TODO(): Nothing = null!!
|
||||
|
||||
fun fn(c: Char?): Any? =
|
||||
if (c == null) TODO()
|
||||
else when (<!DEBUG_INFO_SMARTCAST!>c<!>) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
package
|
||||
|
||||
public fun TODO(): kotlin.Nothing
|
||||
public fun fn(/*0*/ c: kotlin.Char?): kotlin.Any?
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
fun <T> run(f: () -> T): T {
|
||||
return f()
|
||||
}
|
||||
|
||||
// invalid, depends on local class
|
||||
fun <!EXPOSED_FUNCTION_RETURN_TYPE!>foo<!>() = run {
|
||||
class A
|
||||
|
||||
@@ -3,7 +3,6 @@ package
|
||||
public fun bar(): My
|
||||
public fun foo(): foo.<anonymous>.A
|
||||
public fun gav(): () -> gav.<anonymous>.B
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
|
||||
public abstract class My {
|
||||
public constructor My()
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
fun <T> run(f: () -> T): T {
|
||||
return f()
|
||||
}
|
||||
|
||||
class My<T>(val value: T)
|
||||
|
||||
open class Base
|
||||
|
||||
@@ -5,7 +5,6 @@ public fun invalid2(): My<invalid2.<no name provided>>
|
||||
public fun invalid3(): My<invalid3.<no name provided>>
|
||||
public fun invalid4(): My<My<invalid4.<anonymous>.Local>>
|
||||
public fun invalid5(): My<invalid5.<anonymous>.invalid5a.<anonymous>.Local>
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
public fun valid1(): kotlin.Any
|
||||
public fun valid2(): Base
|
||||
public fun valid3(): My<Base>
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
fun <T> run(f: () -> T): T = f()
|
||||
|
||||
|
||||
class Something {
|
||||
public val publicVal1 = object { override fun toString() = "!" }
|
||||
protected val protectedVal1 = object { override fun toString() = "!" }
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
|
||||
public final class Something {
|
||||
public constructor Something()
|
||||
internal final val internalVal1: kotlin.Any
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
fun <T> run(f: () -> T): T {
|
||||
return f()
|
||||
}
|
||||
|
||||
class My<T>(val value: T)
|
||||
|
||||
open class Base
|
||||
|
||||
@@ -12,7 +12,6 @@ public val valid4: My<Base>
|
||||
public val valid5: My<kotlin.Any>
|
||||
public val valid6: My<kotlin.Any>
|
||||
public val valid7: My<My<*>>
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
|
||||
public open class Base {
|
||||
public constructor Base()
|
||||
|
||||
-2
@@ -16,5 +16,3 @@ fun main(args: Array<String>) {
|
||||
findByName("")
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> with(t: T, f: T.() -> Unit) {}
|
||||
-1
@@ -1,7 +1,6 @@
|
||||
package
|
||||
|
||||
public fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
|
||||
public fun </*0*/ T> with(/*0*/ t: T, /*1*/ f: T.() -> kotlin.Unit): kotlin.Unit
|
||||
|
||||
public final class Foo {
|
||||
public constructor Foo()
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
fun foo() {
|
||||
fun run(block: () -> Unit) = block()
|
||||
|
||||
class A
|
||||
fun bar() {}
|
||||
(fun <!ANONYMOUS_FUNCTION_WITH_NAME!>bar<!>() {})
|
||||
|
||||
-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 {
|
||||
|
||||
@@ -5,8 +5,6 @@ fun CharSequence?.bar2() {}
|
||||
|
||||
fun <T : CharSequence> T.bar3() {}
|
||||
|
||||
fun <T, R> T.let(f: (T) -> R): R = f(this)
|
||||
|
||||
fun <T : String?> foo(x: T) {
|
||||
x<!UNSAFE_CALL!>.<!>length
|
||||
x?.length
|
||||
|
||||
@@ -4,4 +4,3 @@ public fun </*0*/ T : kotlin.String?> foo(/*0*/ x: T): kotlin.Unit
|
||||
public fun </*0*/ T : kotlin.CharSequence?> T.bar1(): kotlin.Unit
|
||||
public fun kotlin.CharSequence?.bar2(): kotlin.Unit
|
||||
public fun </*0*/ T : kotlin.CharSequence> T.bar3(): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> T.let(/*0*/ f: (T) -> R): R
|
||||
|
||||
Vendored
-2
@@ -4,8 +4,6 @@ class A<T> {
|
||||
}
|
||||
class Out<out E>
|
||||
|
||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
|
||||
fun test(x: A<out CharSequence>, y: Out<CharSequence>) {
|
||||
with(x) {
|
||||
// TODO: this diagnostic could be replaced with TYPE_MISMATCH_DUE_TO_TYPE_PROJECTION
|
||||
|
||||
Vendored
-1
@@ -1,7 +1,6 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ x: A<out kotlin.CharSequence>, /*1*/ y: Out<kotlin.CharSequence>): kotlin.Unit
|
||||
public inline fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public final class A</*0*/ T> {
|
||||
public constructor A</*0*/ T>()
|
||||
|
||||
@@ -12,5 +12,3 @@ class P {
|
||||
checkSubtype<Unit>(r)
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> run(f: () -> T) : T = f()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package
|
||||
|
||||
package j {
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
|
||||
public final class P {
|
||||
public constructor P()
|
||||
|
||||
@@ -7,5 +7,3 @@ fun test() {
|
||||
2
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> run(f: () -> T): T = f()
|
||||
@@ -1,4 +1,3 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
@@ -35,7 +35,5 @@ fun a() {
|
||||
}
|
||||
}
|
||||
|
||||
public fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
|
||||
fun consumeInt(i: Int) {}
|
||||
fun consumeString(s: String) {}
|
||||
-1
@@ -3,7 +3,6 @@ package
|
||||
public fun a(): kotlin.Unit
|
||||
public fun consumeInt(/*0*/ i: kotlin.Int): kotlin.Unit
|
||||
public fun consumeString(/*0*/ s: kotlin.String): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
public fun Example.div(/*0*/ other: Example): kotlin.Int
|
||||
public operator infix fun Example.minus(/*0*/ other: Example): kotlin.Int
|
||||
public fun Example.plus(/*0*/ other: Example): kotlin.Int
|
||||
|
||||
-2
@@ -41,7 +41,5 @@ fun a() {
|
||||
}
|
||||
}
|
||||
|
||||
public fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
|
||||
fun consumeInt(i: Int) {}
|
||||
fun consumeString(s: String) {}
|
||||
-1
@@ -3,7 +3,6 @@ package
|
||||
public fun a(): kotlin.Unit
|
||||
public fun consumeInt(/*0*/ i: kotlin.Int): kotlin.Unit
|
||||
public fun consumeString(/*0*/ s: kotlin.String): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
public fun Example.div(/*0*/ other: Example): kotlin.String
|
||||
public operator infix fun Example.minus(/*0*/ other: Example): kotlin.String
|
||||
public fun Example.plus(/*0*/ other: Example): kotlin.String
|
||||
|
||||
Vendored
-1
@@ -43,4 +43,3 @@ fun test() {
|
||||
|
||||
fun J.foo() {}
|
||||
fun J?.bar() {}
|
||||
fun <T> with(t: T, f: T.() -> Unit) {}
|
||||
|
||||
Vendored
-1
@@ -1,7 +1,6 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
public fun </*0*/ T> with(/*0*/ t: T, /*1*/ f: T.() -> kotlin.Unit): kotlin.Unit
|
||||
public fun J?.bar(): kotlin.Unit
|
||||
public fun J.foo(): kotlin.Unit
|
||||
|
||||
|
||||
-3
@@ -38,6 +38,3 @@ fun test() {
|
||||
foo()
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> with(t: T, f: T.() -> Unit) {}
|
||||
|
||||
|
||||
-1
@@ -1,7 +1,6 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
public fun </*0*/ T> with(/*0*/ t: T, /*1*/ f: T.() -> kotlin.Unit): kotlin.Unit
|
||||
|
||||
public open class J {
|
||||
public constructor J()
|
||||
|
||||
@@ -26,7 +26,6 @@ fun <T> generic_invoker(gen : () -> T) : T {
|
||||
|
||||
fun println(message : Int) { System.out.println(message) }
|
||||
fun println(message : Long) { System.out.println(message) }
|
||||
inline fun <T> run(body : () -> T) : T = body()
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ public fun </*0*/ T> generic_invoker(/*0*/ gen: () -> T): T
|
||||
public fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
|
||||
public fun println(/*0*/ message: kotlin.Int): kotlin.Unit
|
||||
public fun println(/*0*/ message: kotlin.Long): kotlin.Unit
|
||||
public inline fun </*0*/ T> run(/*0*/ body: () -> T): T
|
||||
public fun </*0*/ T> kotlin.collections.Iterable<T>.foreach(/*0*/ operation: (T) -> kotlin.Unit): kotlin.Unit
|
||||
public fun </*0*/ T> kotlin.collections.Iterable<T>.foreach(/*0*/ operation: (kotlin.Int, T) -> kotlin.Unit): kotlin.Unit
|
||||
public infix fun </*0*/ T> kotlin.collections.Iterator<T>.foreach(/*0*/ operation: (T) -> kotlin.Unit): kotlin.Unit
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// KT-439 Support labeled function literals in call arguments
|
||||
|
||||
inline fun <T> run1(body : () -> T) : T = body()
|
||||
|
||||
fun main1(<!UNUSED_PARAMETER!>args<!> : Array<String>) {
|
||||
run1 l@{ 1 } // should not be an error
|
||||
run l@{ 1 } // should not be an error
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
package
|
||||
|
||||
public fun main1(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
|
||||
public inline fun </*0*/ T> run1(/*0*/ body: () -> T): T
|
||||
|
||||
@@ -31,5 +31,3 @@ fun test(c: () -> String, e: Int.() -> String) {
|
||||
(e)()
|
||||
}
|
||||
}
|
||||
|
||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
@@ -2,7 +2,6 @@ package
|
||||
|
||||
public fun test(/*0*/ c: () -> kotlin.String, /*1*/ e: kotlin.Int.() -> kotlin.String): kotlin.Unit
|
||||
public fun test(/*0*/ a: A, /*1*/ b: B): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
|
||||
@@ -19,5 +19,3 @@ fun test(a: A) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
@@ -1,7 +1,6 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ a: A): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public final class A {
|
||||
public constructor A(/*0*/ x: (kotlin.String.() -> kotlin.Unit)?)
|
||||
|
||||
@@ -59,6 +59,3 @@ fun test(d: D, c: C) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------
|
||||
fun <T, R> with(receiver: T, f: T.() -> R) : R = receiver.f()
|
||||
@@ -5,7 +5,6 @@ public fun test(/*0*/ a: A): kotlin.Unit
|
||||
public fun test(/*0*/ b: B): kotlin.Unit
|
||||
public fun test(/*0*/ d: D, /*1*/ c: C): kotlin.Unit
|
||||
public fun test(/*0*/ foo: Foo): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
public operator fun Foo.invoke(): kotlin.Unit
|
||||
|
||||
public interface A {
|
||||
|
||||
@@ -58,6 +58,3 @@ fun test(d: D, c: C) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------
|
||||
fun <T, R> with(receiver: T, f: T.() -> R) : R = receiver.f()
|
||||
@@ -5,7 +5,6 @@ public fun test(/*0*/ a: A): kotlin.Unit
|
||||
public fun test(/*0*/ b: B): kotlin.Unit
|
||||
public fun test(/*0*/ d: D, /*1*/ c: C): kotlin.Unit
|
||||
public fun test(/*0*/ foo: Foo): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public interface A {
|
||||
public abstract val foo: Foo
|
||||
|
||||
@@ -121,6 +121,3 @@ fun test(u: U, v: V, x: X) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------
|
||||
fun <T, R> with(receiver: T, f: T.() -> R) : R = receiver.f()
|
||||
-1
@@ -5,7 +5,6 @@ public fun test(/*0*/ c: C, /*1*/ b: B): kotlin.Unit
|
||||
public fun test(/*0*/ e: E, /*1*/ d: D): kotlin.Unit
|
||||
public fun test(/*0*/ g: G, /*1*/ f: F): kotlin.Unit
|
||||
public fun test(/*0*/ u: U, /*1*/ v: V, /*2*/ x: X): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public interface A {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
Vendored
-5
@@ -40,9 +40,6 @@ fun test(a: A, b: B) {
|
||||
}
|
||||
}
|
||||
|
||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
|
||||
|
||||
// FILE: 1.kt
|
||||
package fooIsMember
|
||||
|
||||
@@ -84,5 +81,3 @@ fun test(a: A, b: B) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
Vendored
-2
@@ -3,7 +3,6 @@ package
|
||||
package fooIsExtension {
|
||||
public val fooIsExtension.A.foo: fooIsExtension.B.() -> kotlin.Unit
|
||||
public fun test(/*0*/ a: fooIsExtension.A, /*1*/ b: fooIsExtension.B): kotlin.Unit
|
||||
public inline fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
@@ -22,7 +21,6 @@ package fooIsExtension {
|
||||
|
||||
package fooIsMember {
|
||||
public fun test(/*0*/ a: fooIsMember.A, /*1*/ b: fooIsMember.B): kotlin.Unit
|
||||
public inline fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
|
||||
@@ -15,5 +15,3 @@ fun test(a: A, b: B) {
|
||||
(a.foo)(this)
|
||||
}
|
||||
}
|
||||
|
||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
@@ -1,7 +1,6 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ a: A, /*1*/ b: B): kotlin.Unit
|
||||
public inline fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
|
||||
@@ -16,5 +16,3 @@ fun test(a: A, b: B) {
|
||||
<!FUNCTION_EXPECTED!>(a)<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
@@ -2,7 +2,6 @@ package
|
||||
|
||||
public val B.a: () -> kotlin.Int
|
||||
public fun test(/*0*/ a: A, /*1*/ b: B): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
|
||||
-3
@@ -7,6 +7,3 @@ fun test() {
|
||||
}
|
||||
|
||||
fun foo(x: Int) = x
|
||||
|
||||
// from library
|
||||
fun <T, R> with(receiver: T, f: T.() -> R) : R = receiver.f()
|
||||
-1
@@ -3,5 +3,4 @@ package
|
||||
package c {
|
||||
public fun foo(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
public fun test(): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
}
|
||||
|
||||
-2
@@ -16,5 +16,3 @@ fun test(foo: A.() -> Int) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
-1
@@ -1,7 +1,6 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ foo: A.() -> kotlin.Int): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
|
||||
-2
@@ -11,5 +11,3 @@ fun test(foo: A.() -> Int) {
|
||||
this.foo() checkType { _<A>() }
|
||||
}
|
||||
}
|
||||
|
||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
-1
@@ -1,7 +1,6 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ foo: A.() -> kotlin.Int): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
|
||||
@@ -20,4 +20,3 @@ fun a(c: Calendar) {
|
||||
timeInMillis = ""
|
||||
}
|
||||
}
|
||||
fun <T> T.apply(f: T.() -> Unit): T { f(); return this }
|
||||
@@ -2,7 +2,6 @@ package
|
||||
|
||||
public var A.timeInMillis: kotlin.String
|
||||
public fun a(/*0*/ c: Calendar): kotlin.Unit
|
||||
public fun </*0*/ T> T.apply(/*0*/ f: T.() -> kotlin.Unit): T
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
|
||||
@@ -14,6 +14,3 @@ fun test(a: A) {
|
||||
foo() checkType { _<Int>() }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
-1
@@ -1,7 +1,6 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ a: A): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
public fun A.foo(): A
|
||||
|
||||
public final class A {
|
||||
|
||||
@@ -16,5 +16,3 @@ fun test(a: A) {
|
||||
this.foo() checkType { _<A>() }
|
||||
}
|
||||
}
|
||||
|
||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
@@ -1,7 +1,6 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ a: A): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
|
||||
-2
@@ -27,5 +27,3 @@ class B {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
|
||||
-1
@@ -2,7 +2,6 @@ package
|
||||
|
||||
private val A.foo: kotlin.Int
|
||||
public fun test(/*0*/ a: A): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
|
||||
-2
@@ -34,5 +34,3 @@ fun test(a: A, b: B, c: C) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
|
||||
-1
@@ -1,7 +1,6 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ a: A, /*1*/ b: B, /*2*/ c: C): kotlin.Unit
|
||||
public fun </*0*/ T, /*1*/ R> with(/*0*/ receiver: T, /*1*/ f: T.() -> R): R
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
interface Foo
|
||||
fun foo(): Foo? = null
|
||||
|
||||
fun <T> run(f: () -> T): T = f()
|
||||
|
||||
val foo: Foo = run {
|
||||
run {
|
||||
val x = foo()
|
||||
|
||||
@@ -2,7 +2,6 @@ package
|
||||
|
||||
public val foo: Foo
|
||||
public fun foo(): Foo?
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
|
||||
public interface Foo {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
fun <T> run(f: () -> T): T = f()
|
||||
|
||||
class My<T: Any>(val y: T?) {
|
||||
|
||||
fun get(): T = run {
|
||||
|
||||
-2
@@ -1,7 +1,5 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> run(/*0*/ f: () -> T): T
|
||||
|
||||
public final class My</*0*/ T : kotlin.Any> {
|
||||
public constructor My</*0*/ T : kotlin.Any>(/*0*/ y: T?)
|
||||
public final val y: T?
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
interface Foo
|
||||
fun foo(): Foo? = null
|
||||
|
||||
fun <T> run(f: () -> T): T = f()
|
||||
|
||||
val foo: Foo = run {
|
||||
val x = foo()
|
||||
if (x == null) throw Exception()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user