[light classes] inline invalidAccess function

^KT-53097
This commit is contained in:
Dmitry Gridin
2022-07-11 16:43:37 +02:00
committed by Space
parent 67134e9625
commit 30533c7355
2 changed files with 2 additions and 10 deletions
@@ -24,7 +24,8 @@ abstract class KtLightClassBase protected constructor(
lazyCreator = LightClassesLazyCreator(project)
)
override fun getDelegate() = invalidAccess()
override fun getDelegate() =
throw UnsupportedOperationException("Cls delegate shouldn't be loaded for ultra-light classes!")
override fun getFields() = myInnersCache.fields
@@ -1,9 +0,0 @@
/*
* Copyright 2010-2022 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.asJava.classes
internal fun <L : Any> L.invalidAccess(): Nothing =
error("Cls delegate shouldn't be loaded for not too complex ultra-light classes! Qualified name: ${javaClass.name}")