Updated VM-bridges document
brian.goetz at oracle.com
Fri Apr 12 14:33:44 UTC 2019
> This leads us to the next question, given that you can only override "locally" a forwarder, what if a forwarder overrides a forwarder ? You throw a LinkageError ?
Yes, this could arise from inconsistent separate compilation (I thought
I covered this in my doc?) Best choice is probably to let the override
proceed, establishing a new forwarder in that slot. (A lot of the time
when this happens, it will be forwarding to the same place anyway.)
The is the same thing we do with bridges overriding bridges.
A good mental model (for my brain) here is that forwarders act a little
like final methods. When a method overrides a final method, we throw a
hard error. But here, when we see a method overriding a "final-ish"
method, if it is a regular method, we shunt it out of the way, and if it
is a new final-ish method, we let it take over the slot.
More information about the valhalla-spec-observers