JVM IR: fix generation of equals/hashCode for fun interfaces over references

... in case `-Xno-optimized-callable-references` is enabled. Before this
change, the generated abstract equals/hashCode methods were considered
as accidental overrides because they did not have equals/hashCode from
the supertype in the overriddenSymbols list.

 #KT-43666 Fixed
This commit is contained in:
Alexander Udalov
2020-11-30 15:00:11 +01:00
parent 50ae360ff9
commit 606de26646
10 changed files with 63 additions and 2 deletions
@@ -0,0 +1,11 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.NO_OPTIMIZED_CALLABLE_REFERENCES
fun interface P {
fun get(): String
}
class G(val p: P)
fun f(): String = "OK"
fun box(): String = G(::f).p.get()