mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
collectPotentiallyCapturedTypeParameters no longer stops on the first class when going through parents. This is needed because otherwise type parameters of the containing class, and its outer classes, were never considered "captured", and thus not duplicated/remapped later in LocalDeclarationsLowering. This led to the IR where a local function referenced generic type parameters of the outer class. On JVM, local function is generated into a private static function in that container class, and static functions can't use generic type parameters, which crashed some bytecode processing tools. Also, add another explicit call to `seeType` to cover references to generic type parameters in function return types. #KT-45941 Fixed