Skip to content

Commit 004e8cd

Browse files
authored
Adjusted the paragraph about Object members: They do not need special treatment (#3395)
1 parent 3ecf3a7 commit 004e8cd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

accepted/future-releases/extension-types/feature-specification.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -550,11 +550,10 @@ or a subtype of the corresponding instantiated representation type
550550
expression is an extension type member invocation, but it is already
551551
ensured by normal static analysis of subexpressions like `e`.*
552552

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

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

0 commit comments

Comments
 (0)