4 ms·
Instance variables can't be constant propagated, can they? Different instances have different values.
by immibis 2y ago
Instance variables can't be constant propagated, can they? Different instances have different values.
- samus 2y agoOf course they can, and it makes a lot of sense if they contain configuration settings or things like that. An instance might be held in a static final variable, and that reference can be inlined, but it's data can't unless it's an instance of a record or a hidden class, since for those classes final already means final.