[FIR] Replace Deprecated with PrivateForInline in ScopeSession
This commit is contained in:
@@ -5,16 +5,18 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.fir.resolve
|
package org.jetbrains.kotlin.fir.resolve
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.fir.PrivateForInline
|
||||||
|
|
||||||
class ScopeSession {
|
class ScopeSession {
|
||||||
private val scopes = hashMapOf<Any, HashMap<ScopeSessionKey<*, *>, Any>>()
|
private val scopes = hashMapOf<Any, HashMap<ScopeSessionKey<*, *>, Any>>()
|
||||||
|
|
||||||
var returnTypeCalculator: Any? = null
|
var returnTypeCalculator: Any? = null
|
||||||
|
|
||||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Only for getOrBuild")
|
@PrivateForInline
|
||||||
fun scopes() = scopes
|
fun scopes() = scopes
|
||||||
|
|
||||||
|
@OptIn(PrivateForInline::class)
|
||||||
inline fun <reified ID : Any, reified FS : Any> getOrBuild(id: ID, key: ScopeSessionKey<ID, FS>, build: () -> FS): FS {
|
inline fun <reified ID : Any, reified FS : Any> getOrBuild(id: ID, key: ScopeSessionKey<ID, FS>, build: () -> FS): FS {
|
||||||
@Suppress("DEPRECATION_ERROR")
|
|
||||||
return scopes().getOrPut(id) {
|
return scopes().getOrPut(id) {
|
||||||
hashMapOf()
|
hashMapOf()
|
||||||
}.getOrPut(key) {
|
}.getOrPut(key) {
|
||||||
|
|||||||
Reference in New Issue
Block a user