JVM_IR: fold inline lambdas when computing OUTERCLASS
so that the enclosing method of objects defined inside lambdas is the one they are declared in. Note that this does not fix *all* enclosingInfo tests because JVM_IR currently follows the KT-28064 proposal, i.e. does not regenerate objects defined inside lambdas under any circumstances. For example, this causes test boxInline/enclosingInfo/inlineChain2.kt to fail because the enclosing method of objects is _2Kt.box instead of (non-existent in source code) `_2Kt$box$inlined$call$1.invoke` or whatever. What's more important is that OUTERCLASS no longer points to a non-existent `box$lambda-N` and therefore `.enclosingMethod` no longer throws.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// WITH_REFLECT
|
||||
|
||||
Reference in New Issue
Block a user