Light Classes: Drop obsolete constraint which prevents generation of light methods for local class members

#KT-8892 Fixed
This commit is contained in:
Alexey Sedunov
2016-05-27 20:51:32 +03:00
parent d27f3c0189
commit cf8cf37d69
4 changed files with 5 additions and 9 deletions
@@ -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) {