Revert "[light classes] drop old light classes and backend: iteration #2"

This reverts commit 97ce502cbe.
This commit is contained in:
Dmitry Gridin
2022-06-28 13:52:10 +02:00
parent 074dd1c19d
commit 43b4df74bc
42 changed files with 103 additions and 79 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -18,6 +18,7 @@ import org.jetbrains.kotlin.psi.KtClassOrObject
class FirFakeFileImpl(private val classOrObject: KtClassOrObject, ktClass: KtLightClass) : FakeFileForLightClass(
classOrObject.containingKtFile,
{ if (classOrObject.isTopLevel()) ktClass else getOrCreateFirLightClass(getOutermostClassOrObject(classOrObject))!! },
{ null }
) {
override fun findReferenceAt(offset: Int) = ktFile.findReferenceAt(offset)
@@ -172,6 +172,7 @@ class FirLightClassForFacade(
private val packageClsFile = FakeFileForLightClass(
firstFileInFacade,
lightClass = { this },
stub = { null },
packageFqName = packageFqName
)