KT-44530: Inline lambdas returned by inline functions/struct-like value types proposal

KT-44530
TL;DR: This proposal suggests optimising the case of a lambda being returned by an inline function that is only passed to other inline functions and is only stored in local val/var properties without being exposed in non-inline contexts. It also suggests related optimisations that can build on this to provide type-safety. This can all be used to achieve more freedom in DSLs, struct-like value types with zero overhead, and many many more possible use cases. Go vote!

I’d also love to hear if anyone can find more use cases that this opens up to do things more concisely and efficiently, so please if you find anything do reply with it on this thread or on the YouTrack issue. This thread is also intended to serve as discussion for the proposal as a whole but also for maybe alternative ways to achieve the type-safety goals of the Future Opportunities section.