Tolerate missing symbols when resolving fields
This mirrors existing logic for resolving simple names of types.
It's possible this could cause turbine to fail to resolve a compile-time
constant that was pruned from the reduced classpath, except the current
classpath reduction never prunes supertypes of any accessible types.
There is a single instance in the depot where a pre-compiled jar
references a supertype that doesn't exist, and triggers a crash here.
Longer-term, enabling strict deps enforcement of static members will
ensure that any classes we read constant fields from are direct deps.
If overly aggressive classpath pruning did cause a constant field to be
skipped, it would either happen in a context where a constant was
required (switch case, annotation value) and the error would be obvious,
or else a constant field might fail to be given a constant value.
MOE_MIGRATED_REVID=138703676
2 files changed