There are a couple of discussions about this feature. It actually isn’t 100% sound. There are some (edge) cases such as assignment operators where this implicit inlining does not work.
- Chained assignment to struct members (bug+suggestion) · Issue #3073 · crystal-lang/crystal · GitHub
- Combined assignment issue with structs · Issue #13668 · crystal-lang/crystal · GitHub
- [RFC] Always return a special reference for inlined value type instead of copy · Issue #6069 · crystal-lang/crystal · GitHub
- += doesn't seem to work on a property of a struct · Issue #4933 · crystal-lang/crystal · GitHub
I also seem to recall a more recent discussion though I wasn’t able to dig that up.
EDIT: Maybe it was Mutable structs - what am I doing wrong?