KT-47475 Do not copy InnerClass attribute for WhenMapping classes
This commit is contained in:
committed by
teamcity
parent
38099e11c3
commit
d65775ca1a
@@ -83,6 +83,13 @@ class WhenMappingTransformer(
|
||||
methodNodes.add(this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun visitInnerClass(name: String?, outerName: String?, innerName: String?, access: Int) {
|
||||
// Drop the attribute as the recreated class is not an inner class of the original outer class.
|
||||
// In principle, we could also generate a new attribute with outerName set to the caller-side class,
|
||||
// but that would require modification of both the inner (recreated) and the outer (caller-side) classes.
|
||||
// The latter would require a lot of work without any clear benefits.
|
||||
}
|
||||
}, ClassReader.SKIP_FRAMES)
|
||||
|
||||
assert(methodNodes.size == 1) {
|
||||
|
||||
Reference in New Issue
Block a user