[FIR tests] do not distinguish builtins & library origins

fir which is retrieved by LL symbol providers based on stubs,
receives builtin origin when found in kotlin_builtins

pure compiler providers found the same fir declarations in stdlib
and thus receive Library origin

to avoid splitting the testdata, let's ignore the difference
This commit is contained in:
Anna Kozlova
2023-05-03 15:32:52 +02:00
committed by teamcity
parent 89a03a74e4
commit e47561e70b
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.test.frontend.fir.handlers
import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.declarations.FirCallableDeclaration
import org.jetbrains.kotlin.fir.declarations.FirDeclarationOrigin
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
import org.jetbrains.kotlin.fir.render
import org.jetbrains.kotlin.fir.renderer.FirRenderer
@@ -141,7 +142,8 @@ class FirScopeDumpHandler(testServices: TestServices) : FirAnalysisHandler(testS
}
private fun SmartPrinter.printInfo(declaration: FirCallableDeclaration, scope: FirTypeScope, counter: SymbolCounter) {
print("[${declaration.origin}]: ")
val origin = declaration.origin.takeUnless { it == FirDeclarationOrigin.BuiltIns } ?: FirDeclarationOrigin.Library
print("[$origin]: ")
val renderedDeclaration = FirRenderer.noAnnotationBodiesAccessorAndArguments().renderElementAsString(declaration).trim()
print(renderedDeclaration)
print(" from $scope")