-
Bug
-
Resolution: Unresolved
-
P5
-
23
A couple of somewhat confusing things in JVMS 5.4.3.2:
- Field resolution is said to search for the referenced field "in C and its superclasses", ignoring that Step 2 searches its superinterfaces.
- The order of interfaces to search is not clearly specified (compare the handling of order for method resolution, but in that case *which* method is resolved is not important, due to later selection behaviors). Presumably it's a left-to-right depth-first search?
It's also a bit surprising that interfaces take priority over superclasses. Not sure if there's a strong motivation for that, or just (at this point) compatibility.
- Field resolution is said to search for the referenced field "in C and its superclasses", ignoring that Step 2 searches its superinterfaces.
- The order of interfaces to search is not clearly specified (compare the handling of order for method resolution, but in that case *which* method is resolved is not important, due to later selection behaviors). Presumably it's a left-to-right depth-first search?
It's also a bit surprising that interfaces take priority over superclasses. Not sure if there's a strong motivation for that, or just (at this point) compatibility.