Don't delete nested default lambda classes during inline transformation
This commit is contained in:
@@ -166,7 +166,7 @@ class DefaultLambda(
|
||||
classReader.b,
|
||||
invokeMethod.name,
|
||||
invokeMethod.descriptor,
|
||||
lambdaClassType)!!
|
||||
lambdaClassType) ?: error("Can't find method '${invokeMethod.name}${invokeMethod.descriptor}' in '${classReader.className}'")
|
||||
|
||||
if (needReification) {
|
||||
//nested classes could also require reification
|
||||
|
||||
@@ -165,7 +165,9 @@ class MethodInliner(
|
||||
result.merge(transformResult)
|
||||
result.addChangedType(oldClassName, newClassName)
|
||||
|
||||
if (inliningContext.isInliningLambda && transformationInfo!!.canRemoveAfterTransformation()) {
|
||||
if (inliningContext.isInliningLambda &&
|
||||
inliningContext.lambdaInfo !is DefaultLambda && //never delete default lambda classes
|
||||
transformationInfo!!.canRemoveAfterTransformation()) {
|
||||
// this class is transformed and original not used so we should remove original one after inlining
|
||||
result.addClassToRemove(oldClassName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user