mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
It uses the same logic as an old back-end (see SamType#createByValueParameter and genericSamProjectedOut.kt), split into two parts: 1. When inserting SAM casts, use SamType#createByValueParamerer to get the target SAM type. 2. When inserting implicit casts, cast SAM conversions as arguments of methods of out-projected types to the original type of value parameter instead of 'Nothing'.