diff --git a/analysis/decompiled/decompiler-to-file-stubs/tests/org/jetbrains/kotlin/analysis/decompiler/stub/files/AbstractStubBuilderTest.kt b/analysis/decompiled/decompiler-to-file-stubs/tests/org/jetbrains/kotlin/analysis/decompiler/stub/files/AbstractStubBuilderTest.kt index 25bd269b808..55cbb45bc07 100644 --- a/analysis/decompiled/decompiler-to-file-stubs/tests/org/jetbrains/kotlin/analysis/decompiler/stub/files/AbstractStubBuilderTest.kt +++ b/analysis/decompiled/decompiler-to-file-stubs/tests/org/jetbrains/kotlin/analysis/decompiler/stub/files/AbstractStubBuilderTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2023 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. */ @@ -11,7 +11,6 @@ import com.intellij.psi.impl.DebugUtil import com.intellij.psi.stubs.PsiFileStub import com.intellij.psi.stubs.StubElement import org.jetbrains.annotations.TestOnly -import org.jetbrains.kotlin.name.SpecialNames import org.jetbrains.kotlin.psi.stubs.impl.STUB_TO_STRING_PREFIX import org.jetbrains.kotlin.test.KotlinTestUtils import java.nio.file.Paths @@ -47,7 +46,7 @@ fun StubElement.serializeToString(): String { } private fun serializeStubToString(stubElement: StubElement<*>): String { - val treeStr = DebugUtil.stubTreeToString(stubElement).replace(SpecialNames.SAFE_IDENTIFIER_FOR_NO_NAME.asString(), "") + val treeStr = DebugUtil.stubTreeToString(stubElement) // Nodes are stored in form "NodeType:Node" and have too many repeating information for Kotlin stubs // Remove all repeating information (See KotlinStubBaseImpl.toString()) diff --git a/analysis/low-level-api-fir/testdata/classId/namelessClasses.kt b/analysis/low-level-api-fir/testdata/classId/namelessClasses.kt index 610b352dd5a..80b28fc1cec 100644 --- a/analysis/low-level-api-fir/testdata/classId/namelessClasses.kt +++ b/analysis/low-level-api-fir/testdata/classId/namelessClasses.kt @@ -15,5 +15,3 @@ package one.two /* ClassId: one/two/B. */object /* ClassId: one/two/B. */typealias } - -// IGNORE_CONSISTENCY_CHECK: KTIJ-26848 diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/psiUtil/ktPsiUtil.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/psiUtil/ktPsiUtil.kt index 8acaf5c0760..be9b095ea09 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/psiUtil/ktPsiUtil.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/psiUtil/ktPsiUtil.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2023 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. */ @@ -651,9 +651,7 @@ fun KtNamedDeclaration.safeNameForLazyResolve(): Name { return nameAsName.safeNameForLazyResolve() } -fun Name?.safeNameForLazyResolve(): Name { - return SpecialNames.safeIdentifier(this) -} +fun Name?.safeNameForLazyResolve(): Name = this?.takeUnless(Name::isSpecial) ?: SpecialNames.NO_NAME_PROVIDED fun KtNamedDeclaration.safeFqNameForLazyResolve(): FqName? { //NOTE: should only create special names for package level declarations, so we can safely rely on real fq name for parent diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt index 7bcdf38c2ee..0f820b865ae 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt @@ -1,17 +1,6 @@ /* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2010-2023 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. */ package org.jetbrains.kotlin.psi.stubs @@ -23,7 +12,7 @@ object KotlinStubVersions { // Though only kotlin declarations (no code in the bodies) are stubbed, please do increase this version // if you are not 100% sure it can be avoided. // Increasing this version will lead to reindexing of all kotlin source files on the first IDE startup with the new version. - const val SOURCE_STUB_VERSION = 156 + const val SOURCE_STUB_VERSION = 157 // Binary stub version should be increased if stub format (org.jetbrains.kotlin.psi.stubs.impl) is changed // or changes are made to the core stub building code (org.jetbrains.kotlin.idea.decompiler.stubBuilder).