Not saying it’s a good idea even modulo mangling.
Also, Scala 3 inline does not widen access to the field, but generates an accessor inline$csize
, so the scheme breaks down. Not sure if that is a feature, as it is not inlined. Same for access to private field from companion, but accessor is named like mangled field in Scala 2.
I was expecting something "fairly close to the spirit of inline
" as the OP puts it.
Somehow your snippet quote lost a dollar.