Introduce 'reified' instead of 'erased'

This commit is contained in:
Andrey Breslav
2012-06-05 20:05:35 +04:00
parent 0ceee0a383
commit 91606a3901
98 changed files with 158 additions and 157 deletions
@@ -2,7 +2,7 @@
package kt1189
import java.util.concurrent.locks.ReentrantReadWriteLock
inline fun <erased T> ReentrantReadWriteLock.write(action: ()->T) : T {
inline fun <T> ReentrantReadWriteLock.write(action: ()->T) : T {
val rl = readLock().sure()
var readCount = 0
val writeCount = getWriteHoldCount()
@@ -7,7 +7,7 @@ trait FunctionalList<T> {
val tail: FunctionalList<T>
}
fun <erased T> FunctionalList<T>.plus(element: T) : FunctionalList<T> = object: FunctionalList<T> {
fun <T> FunctionalList<T>.plus(element: T) : FunctionalList<T> = object: FunctionalList<T> {
override val size: Int
get() = 1 + this@plus.size
override val tail: FunctionalList<T>