Change behavior of equals/hashCode on adapted function references

Function references are now equal if they refer to the same function,
and if the parameter/return type adaptation, which happens when a
reference is used where some function type is expected, is exactly the
same. This includes the number of expected positional parameters (which
can be affected by defaults/varargs), whether the coercion of vararg
parameter to Array type happened, and whether the coercion of return
type to Unit happened.

 #KT-37543 Fixed
This commit is contained in:
Alexander Udalov
2020-03-16 22:26:46 +01:00
committed by Alexander Udalov
parent c344b85d4e
commit 3269a7e693
24 changed files with 942 additions and 22 deletions
@@ -3226,7 +3226,7 @@ public abstract class kotlin/jvm/internal/CallableReference : java/io/Serializab
protected final field receiver Ljava/lang/Object;
public fun <init> ()V
protected fun <init> (Ljava/lang/Object;)V
protected fun <init> (Ljava/lang/Object;Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)V
protected fun <init> (Ljava/lang/Object;Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Z)V
public fun call ([Ljava/lang/Object;)Ljava/lang/Object;
public fun callBy (Ljava/util/Map;)Ljava/lang/Object;
public fun compute ()Lkotlin/reflect/KCallable;