Skip to content

Commit

Permalink
Adjusted the paragraph about Object members: They do not need special…
Browse files Browse the repository at this point in the history
… treatment (#3395)
  • Loading branch information
eernstg authored Oct 12, 2023
1 parent 3ecf3a7 commit 004e8cd
Showing 1 changed file with 4 additions and 5 deletions.
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

0 comments on commit 004e8cd

Please sign in to comment.