Experimental listOfSpec delegate.

This commit is contained in:
Alexander Nozik 2021-05-11 12:43:00 +03:00
parent 82b328f797
commit 1037c45c0d

View File

@ -85,7 +85,7 @@ public fun Context.withEnv(block: ContextBuilder.() -> Unit): Context {
} }
val builder = ContextBuilder(this, name + "env", properties).apply(block) val builder = ContextBuilder(this, name + "env", properties).apply(block)
val requiresFork = builder.factories.values.any { (factory, meta) -> val requiresFork = builder.factories.any { (factory, meta) ->
!contains(factory, meta) !contains(factory, meta)
} || ((properties as Meta) == builder.meta) } || ((properties as Meta) == builder.meta)
return if (requiresFork) builder.build() else this return if (requiresFork) builder.build() else this