[FIR IDE] Suppress warnings to build project with warnings-as-errors mode
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ internal class FirPhaseRunner {
|
|||||||
* We temporary disable multi-locks to fix deadlocks problem
|
* We temporary disable multi-locks to fix deadlocks problem
|
||||||
* @see org.jetbrains.kotlin.idea.fir.low.level.api.file.builder.LockProvider
|
* @see org.jetbrains.kotlin.idea.fir.low.level.api.file.builder.LockProvider
|
||||||
*/
|
*/
|
||||||
inline fun runPhaseWithCustomResolve(phase: FirResolvePhase, crossinline resolve: () -> Unit) =
|
inline fun runPhaseWithCustomResolve(@Suppress("UNUSED_PARAMETER") phase: FirResolvePhase, crossinline resolve: () -> Unit) =
|
||||||
runPhaseWithCustomResolveWithoutLock(resolve)
|
runPhaseWithCustomResolveWithoutLock(resolve)
|
||||||
|
|
||||||
private inline fun runPhaseWithCustomResolveWithoutLock(crossinline resolve: () -> Unit) {
|
private inline fun runPhaseWithCustomResolveWithoutLock(crossinline resolve: () -> Unit) {
|
||||||
|
|||||||
+2
-2
@@ -19,11 +19,11 @@ internal class LockProvider<KEY> {
|
|||||||
val globalLock = ReentrantLock()
|
val globalLock = ReentrantLock()
|
||||||
|
|
||||||
@OptIn(PrivateForInline::class)
|
@OptIn(PrivateForInline::class)
|
||||||
inline fun <R> withWriteLock(key: KEY, action: () -> R): R =
|
inline fun <R> withWriteLock(@Suppress("UNUSED_PARAMETER") key: KEY, action: () -> R): R =
|
||||||
globalLock.withLock(action)
|
globalLock.withLock(action)
|
||||||
|
|
||||||
@OptIn(PrivateForInline::class)
|
@OptIn(PrivateForInline::class)
|
||||||
inline fun <R> withWriteLockPCECheck(key: KEY, lockingIntervalMs: Long, action: () -> R): R =
|
inline fun <R> withWriteLockPCECheck(@Suppress("UNUSED_PARAMETER") key: KEY, lockingIntervalMs: Long, action: () -> R): R =
|
||||||
globalLock.lockWithPCECheck(lockingIntervalMs, action) //We temporary disable multi-locks to fix deadlocks problem
|
globalLock.lockWithPCECheck(lockingIntervalMs, action) //We temporary disable multi-locks to fix deadlocks problem
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
@@ -62,6 +62,7 @@ internal fun <D : FirDeclaration> FirLazyDeclarationResolver.lazyResolveDeclarat
|
|||||||
}
|
}
|
||||||
|
|
||||||
check(currentDeclaration.returnTypeRef is FirResolvedTypeRef)
|
check(currentDeclaration.returnTypeRef is FirResolvedTypeRef)
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
currentDeclaration as D
|
currentDeclaration as D
|
||||||
}
|
}
|
||||||
ResolveType.BodyResolveWithChildren, ResolveType.CallableBodyResolve -> {
|
ResolveType.BodyResolveWithChildren, ResolveType.CallableBodyResolve -> {
|
||||||
|
|||||||
+1
@@ -312,6 +312,7 @@ internal class FirLazyDeclarationResolver(private val firFileBuilder: FirFileBui
|
|||||||
check(realPsi != null) {
|
check(realPsi != null) {
|
||||||
"Cannot remap element without PSI"
|
"Cannot remap element without PSI"
|
||||||
}
|
}
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
val firDeclaration = FirElementFinder.findElementIn<FirDeclaration>(firContainer) {
|
val firDeclaration = FirElementFinder.findElementIn<FirDeclaration>(firContainer) {
|
||||||
it.realPsi == realPsi
|
it.realPsi == realPsi
|
||||||
} as? D
|
} as? D
|
||||||
|
|||||||
Reference in New Issue
Block a user