kevinmost
04/22/2017, 3:26 PMvar foo by mutableLazy { 1 }
init {
foo = 2
print(foo)
}
What would the value of foo
be when it's printed now? 1
or 2
? If it's 1, that's confusing. If it's 2, did the block ever get invoked (because it could potentially have side-effects)? Why or why not?