The docs for providing a delegate have a
- local convenience function that
- wraps a constructor of an intermediate Loader class
- that provides a secret provideDelegate operator fun (be careful, it is not an interface or part of the constructor!)
- That creates an object
- which doesn’t really need to implement ReadOnlyProperty, just have the right methods.
This took awhile for my brain to untangle, and I’m guessing might scare people off of using custom Delegated Properties - which is a shame, they are great!
provideDelegate couldn’t somehow be stuffed into a normal constructor?