PRE SIP: ThisFunction | scope injection (similar to kotlin receiver function)

Scope injection has nothing to do with mutable builders, this is non-sequitur. I want scope injection for ZIO Test’s immutable builder – right now all tests written with it must include boilerplate imports:

import zio.test.Assertion._
import zio.test._

Every time – only because ZIO Test chose to use constructor parameter for test construction instead of inheritance. Having scope injection for top-level members evens the odds and would allow suite, testM and other functions to be used in Spec expression without using inheritance and without constantly repeating boilerplate imports.

1 Like