Skip to content

[extension types] Adjust the paragraph about Object members: They do not need special treatment #3395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -550,11 +550,10 @@ or a subtype of the corresponding instantiated representation type
expression is an extension type member invocation, but it is already
ensured by normal static analysis of subexpressions like `e`.*

If the name of `m` is a name in the interface of `Object` (that is,
`toString`, `==`, `hashCode`, `runtimeType`, or `noSuchMethod`), the static
analysis of the invocation is treated as an ordinary instance member
invocation on a receiver of type `Object?` and with the same `args` or
`typeArgs`, if any.
*Note that if the name of `m` is a name in the interface of `Object` (that
is, `toString`, `==`, `hashCode`, `runtimeType`, or `noSuchMethod`), the
denoted member is necessarily a non-extension type member, which determines
the static analysis and dynamic semantics.*

Otherwise, a compile-time error occurs if `V` does not have a member
named `m`.
Expand Down