Today I got bitten by something like:
class MyClass(var x: Stack<Int>): Stack<Int> by x
I expected the class to delegate to the content of variable
x, not to its initial value.
Suggestion: put up a warning when delegation to a
var happens, otherwise I predict confusion will ensue (aka I’m not the only dumb).
It would be nice to add a way to delegate to the content of a
var instead of its initial value however.