Support equals/hashCode for fun interfaces in JVM and JVM_IR

#KT-33455 Fixed
This commit is contained in:
Alexander Udalov
2020-03-23 11:23:49 +01:00
committed by Alexander Udalov
parent de461dd9a5
commit 9fa8e009c6
25 changed files with 1036 additions and 23 deletions
@@ -0,0 +1,14 @@
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND_FIR: JVM_IR
fun interface FunInterface {
fun invoke()
}
private fun id(f: FunInterface): Any = f
fun box(): String {
if (id { "lambda" } == id { "lambda" }) return "Fail: SAMs over lambdas are never equal"
return "OK"
}