@@ -15,6 +15,11 @@ information about the process, including in their change logs.
1515[ 1 ] : https://github.com/dart-lang/language/blob/master/working/1426-extension-types/feature-specification-views.md
1616[ 2 ] : https://github.com/dart-lang/language/blob/master/working/extension_structs/overview.md
1717
18+ 2023.11.14
19+ - Specify that a method declaration will shadow an otherwise "inherited"
20+ setter with the same basename, and vice versa. This eliminates a
21+ method/setter conflict that would otherwise be impossible to avoid.
22+
18232023.10.31
1924 - Simplify the rules about the relationship between extension types and the
2025 types ` Object ` and ` Object? ` .
@@ -516,14 +521,43 @@ type declaration, but this section is concerned with invocations of
516521extension type members.*
517522
518523We need to introduce a concept that is similar to existing concepts
519- for regular classes.
524+ for regular classes, namely that an extension type _ has_ a certain member.
525+
526+ First, we say that an extension type member declaration _ DM_ _ precludes_ an
527+ extension type member declaration _ DM2_ if they have the same name, or the
528+ basename of _ DM_ is the same as the basename of _ DM2_ , and one of _ DM_ and
529+ _ DM2_ is a setter declaration, and the other is a method declaration.
530+
531+ Moreover, we say that an extension type member declaration _ DM_ _ precludes_
532+ a non-extension type member signature ` m ` if they have the same name, or
533+ the basename of _ DM_ is the same as the basename of ` m ` , and _ DM_ is a
534+ setter declaration and ` m ` is a method signature, or _ DM_ is a method
535+ declaration and ` m ` is a setter signature.
536+
537+ * We use this concept with superinterfaces of DM. DM may have multiple
538+ non-extension type superinterfaces, and they may differ with respect to the
539+ precise member signature for a given member name, but they will not differ
540+ with respect to the kind: ` m ` may be a method or a setter or a getter, but
541+ it cannot be, e.g., a method in one superinterface and a getter in another
542+ one. Hence, it is well-defined to talk about ` m ` being a method or a setter
543+ signature even though there may be multiple member signatures with the
544+ given name.*
520545
521546We say that an extension type declaration _ DV_ _ has_ an extension type
522- member named ` n ` in the case where _ DV_ declares a member named ` n ` , and in
523- the case where _ DV_ has no such declaration, but _ DV_ has a direct
524- extension type superinterface ` V ` that has an extension type member named
525- ` n ` . In both cases, when this is unique, _ the extension type member
526- declaration named ` n ` that DV has_ is said declaration.
547+ member named ` n ` in the cases where:
548+
549+ - _ DV_ declares a member named ` n ` .
550+ - _ DV_ has no such declaration, but _ DV_ has a direct extension type
551+ superinterface ` V ` that has an extension type member named ` n ` due to a
552+ member declaration _ DM2_ , and _ DV_ does not declare a member that
553+ precludes _ DM2_ .
554+
555+ * Note that it is well-defined which member declaration causes an extension
556+ type to have a given extension type member because a compile-time error
557+ occurs whenever this is ambiguous: Either _ DV_ contains a declaration
558+ named ` n ` , or at most one superinterface has an extension type member named
559+ ` n ` , which is then (by induction) due to a uniquely determined
560+ extension type member declaration.*
527561
528562The type (function type for a method, return type for a getter) of this
529563declaration relative to this invocation is determined by repeatedly
@@ -534,10 +568,14 @@ type parameters of the extension type into the type of that declaration.
534568
535569Similarly, we say that an extension type declaration _ DV_ _ has_ a
536570non-extension type member named ` n ` in the case where _ DV_ does not declare
537- a member named ` n ` , but _ DV_ has a direct extension type superinterface ` V `
538- that has a non-extension type member named ` n ` , or _ DV_ has a direct
539- non-extension type superinterface ` T ` whose interface contains a member
540- signature named ` n ` .
571+ a member named ` n ` , and one of the following criteria is satisfied:
572+
573+ - _ DV_ has a direct extension type superinterface ` V ` that has a
574+ non-extension type member with signature ` m ` and name ` n ` , and _ DV_ does
575+ not declare a member that precludes ` m ` .
576+ - _ DV_ has a direct non-extension type superinterface whose interface
577+ contains a member signature ` m ` named ` n ` , and _ DV_ does not declare a
578+ member that precludes ` m ` .
541579
542580The member signature of such a member is the combined member signature of
543581all non-extension type members named ` n ` that _ DV_ has, again using a
0 commit comments