Move DummyDelegate to :compiler:util
Deleted DummyDelegate from a pair of usages across the project, and moved it to :compiler:util module to avoid further duplicates
This commit is contained in:
committed by
Space Team
parent
2578bfefd5
commit
fd2954a8d3
+1
-7
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.diagnostics
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.config.LanguageFeature
|
||||
import org.jetbrains.kotlin.utils.DummyDelegate
|
||||
import kotlin.properties.ReadOnlyProperty
|
||||
import kotlin.reflect.KClass
|
||||
import kotlin.reflect.KProperty
|
||||
@@ -220,10 +221,3 @@ class DeprecationDiagnosticFactory4DelegateProvider<A, B, C, D>(
|
||||
return DummyDelegate(KtDiagnosticFactoryForDeprecation4(featureForError, warningFactory, errorFactory))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private class DummyDelegate<T>(val value: T) : ReadOnlyProperty<Any?, T> {
|
||||
override fun getValue(thisRef: Any?, property: KProperty<*>): T {
|
||||
return value
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user