Implement compiled script caching with tests

This commit is contained in:
Ilya Chernikov
2018-09-05 13:16:49 +02:00
parent 836ea28fe7
commit ae107339fd
8 changed files with 357 additions and 65 deletions
@@ -31,6 +31,8 @@ open class PropertiesCollection(private val properties: Map<Key<*>, Any> = empty
fun <T> getNoDefault(key: PropertiesCollection.Key<T>): T? =
properties[key]?.let { it as T }
fun entries(): Set<Map.Entry<Key<*>, Any>> = properties.entries
companion object {
fun <T> key(defaultValue: T? = null) = PropertyKeyDelegate(defaultValue)
fun <T> keyCopy(source: Key<T>) = PropertyKeyCopyDelegate(source)