Light Classes: Drop obsolete constraint which prevents generation of light methods for local class members
#KT-8892 Fixed
This commit is contained in:
+1
@@ -417,6 +417,7 @@ open class KtLightClassForExplicitDeclaration(
|
||||
|
||||
private fun predictFqName(classOrObject: KtClassOrObject): FqName? {
|
||||
if (classOrObject.isLocal()) {
|
||||
if (classOrObject.containingFile.virtualFile == null) return null
|
||||
val data = getLightClassDataExactly(classOrObject)
|
||||
return data?.jvmQualifiedName
|
||||
}
|
||||
|
||||
@@ -162,12 +162,6 @@ object LightClassUtil {
|
||||
return declaration.getContainingClassOrObject().toLightClass()
|
||||
}
|
||||
|
||||
if (!canGenerateLightClass(declaration)) {
|
||||
// Can't get wrappers for internal declarations. Their classes are not generated during calcStub
|
||||
// with ClassBuilderMode.LIGHT_CLASSES mode, and this produces "Class not found exception" in getDelegate()
|
||||
return null
|
||||
}
|
||||
|
||||
val parent = declaration.parent
|
||||
|
||||
if (parent is KtFile) {
|
||||
|
||||
Reference in New Issue
Block a user