Code cleanup: type parameters can have in / out variance

This commit is contained in:
Mikhail Glukhikh
2016-04-29 15:09:06 +03:00
parent 9afb0d5f59
commit 733f3e8025
45 changed files with 76 additions and 74 deletions
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.utils
import kotlin.reflect.KProperty
class CachedValueProperty<TValue : Any, TTimestamp : Any>(
class CachedValueProperty<out TValue : Any, TTimestamp : Any>(
private val calculator: () -> TValue,
private val timestampCalculator: () -> TTimestamp
) {
@@ -16,7 +16,7 @@
package org.jetbrains.kotlin.utils.concurrent.block
class LockedClearableLazyValue<T: Any>(val lock: Any, val init: () -> T) {
class LockedClearableLazyValue<out T: Any>(val lock: Any, val init: () -> T) {
@Volatile private var value: T? = null
fun get(): T {