megamiun
10/11/2017, 4:49 PMkarelpeeters
10/11/2017, 4:52 PMvar a = foo(b)
, a
doesn't change as b
changes. Also when delegating to an exapression that's not just a reference wouldn't work: class Child: Base by buildBase(...)
.megamiun
10/11/2017, 4:57 PMclass Child: Base by buildBase(...)
, it would continue to be like the buildBase being a val. The question I am more worried is when the syntax makes you think it will follow the variable value, as in the gist, where a class DelegatedContextWrapper(private var context: Context = BasicContext()) : Context by context
was allowed to be created but the delegation doesn't follow the variable.Andreas Sinz
10/11/2017, 5:13 PMmegamiun
10/11/2017, 5:15 PMkarelpeeters
10/11/2017, 8:11 PMmegamiun
10/11/2017, 8:39 PM