In Java, anonymous classes and methods are given a unique name $1, $2, etc. In Kotlin, the elements have the same name, <anonymous>. The non-unique name means that the same signature will be generated for anonymous classes or functions of the same type, leading to incorrect type attribution.
In Java, anonymous classes and methods are given a unique name
$1
,$2
, etc. In Kotlin, the elements have the same name,<anonymous>
. The non-unique name means that the same signature will be generated for anonymous classes or functions of the same type, leading to incorrect type attribution.