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