[FIR] fixed overridden symbols of "invoke" in KFunction

IR expects overridden symbols of "invoke" in KFunction to be "invoke"
in the corresponding Function classes.
Before this commit we don't set overriddenSymbol, now we do.
This commit is contained in:
Juan Chen
2020-02-07 13:52:01 -08:00
committed by Mikhail Glukhikh
parent e3721ed406
commit 04e8cba857
32 changed files with 58 additions and 69 deletions

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
abstract class A {
abstract fun foo(): String
}

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
fun foo(k: Int) = k

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
fun o() = 111
fun k(k: Int) = k

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
fun foo() = "OK"
}

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
fun foo(result: String) = result
}

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
var result = "Fail"

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
var result = "Fail"

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
var result = "OK"
}

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A(val result: String)
fun box() = (::A)("OK").result

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A
fun box() = if ((A::equals)(A(), A())) "Fail" else "OK"

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
fun result() = (A::foo)(this, "OK")
}

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A
fun A.foo() = (A::bar)(this, "OK")

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun run(arg1: A, funRef:A.() -> String): String {
return arg1.funRef()
}

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun run(arg1: A, arg2: String, funRef:A.(String) -> String): String {
return arg1.funRef(arg2)
}

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
var result = "Fail"
}

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun run(arg1: A, arg2: String, funRef:A.(String) -> Unit): Unit {
return arg1.funRef(arg2)
}

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String {
class A {
val result = "OK"

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String {
class A {
var result: String = "Fail";

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
class Nested {
val result = "OK"

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
class Nested(val result: String)
}

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
private fun foo() = "OK"

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun <T> run(arg1: T, arg2: T, funRef:(T,T) -> T): T {
return funRef(arg1, arg2)
}

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun <T> run(arg1: T, arg2: T, funRef:(T,T) -> T): T {
return funRef(arg1, arg2)
}

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun foo(x: String) = x
fun box(): String {

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
var result = "Fail"
fun foo() {

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
var result = "Fail"
fun foo(newResult: String) {

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
interface A {
fun foo(): String
}