Add 'operator' keyword
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
class Example {
|
||||
operator fun plus(other: Example) {}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public final class Example {
|
||||
/*primary*/ public constructor Example()
|
||||
public final operator fun plus(/*0*/ other: test.Example): kotlin.Unit
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,7 @@ fun bar(f: Int.()->Unit) {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Resulting descriptor: fun Int.invoke(): Unit defined in kotlin.Function1
|
||||
Resulting descriptor: operator fun Int.invoke(): Unit defined in kotlin.Function1
|
||||
|
||||
Explicit receiver kind = BOTH_RECEIVERS
|
||||
Dispatch receiver = f {[@kotlin.Extension] Function1<Int, Unit>}
|
||||
|
||||
@@ -5,7 +5,7 @@ fun bar(f: ()->Unit) {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Resulting descriptor: fun invoke(): Unit defined in kotlin.Function0
|
||||
Resulting descriptor: operator fun invoke(): Unit defined in kotlin.Function0
|
||||
|
||||
Explicit receiver kind = DISPATCH_RECEIVER
|
||||
Dispatch receiver = f {Function0<Unit>}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ interface A {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Resulting descriptor: fun Int.invoke(): Unit defined in kotlin.Function1
|
||||
Resulting descriptor: operator fun Int.invoke(): Unit defined in kotlin.Function1
|
||||
|
||||
Explicit receiver kind = BOTH_RECEIVERS
|
||||
Dispatch receiver = foo {[@kotlin.Extension] Function1<Int, Unit>}
|
||||
|
||||
@@ -9,7 +9,7 @@ fun test(a: A) {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Resulting descriptor: fun invoke(p1: Int): Int defined in kotlin.Function1
|
||||
Resulting descriptor: operator fun invoke(p1: Int): Int defined in kotlin.Function1
|
||||
|
||||
Explicit receiver kind = DISPATCH_RECEIVER
|
||||
Dispatch receiver = foo {Function1<Int, Int>}
|
||||
|
||||
Reference in New Issue
Block a user