[extension types] Adjust the paragraph about Object members: They do not need special treatment #3395
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The extension type feature specification used to have a paragraph about invocations of members of
Object
(hashCode
, operator==
, etc). It stated that the signature was taken fromObject?
. This is not consistent with a situation like the following, because all other non-extension type members would be treated according to the signature known from the traversal of the superinterface graph.This PR changes the given paragraph to commentary, and changes the text to simply say that members of
Object
receive exactly the same treatment as all other non-extension type members. This yields the following behavior:Note that we need to take the combined member signature of
foo
inE2
:E1
contributes the signaturevoid foo()
andB
contributes the signaturevoid foo([int])
, and the combined member signature is thenvoid foo([int])
. The signature fortoString
inE2
is computed in the same manner (as mentioned in the title: there is no need to special-case members ofObject
).