2 ms·
That is very much not inheritance. It’s literally just sugar for delegation: calls which delegate to embedded structs execute in the embedded struct’s context.
by masklinn 3y ago
That is very much not inheritance. It’s literally just sugar for delegation: calls which delegate to embedded structs execute in the embedded struct’s context.
And the embedded struct has to be part of the struct definition, it can’t be snuck in by reopening the class and include-ing new bits.