Rollup Version
4.9.5
Operating System (or Browser)
macOS Sonoma 14.2.1 / Firefox 121.0.1
Node Version (if applicable)
21.6.0
Link To Reproduction
REPL link
Expected Behaviour
state.foo?.(); line should not be eliminated by tree-shaking.
Actual Behaviour
state.foo?.(); is not present in the bundle output.
I assume this is caused by the fact that the shared object is accessed via state not via stack[0] or stack.at(-1). Changing to any of these two correctly preserves the line in the output.