Skip to content

Commit b77ed81

Browse files
authored
Add missing getter/setter type rule (#3338)
1 parent b7e86ca commit b77ed81

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ 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.09.11
19+
- Add missing rule about getter/setter signature correspondence.
20+
1821
2023.08.17
1922
- Add covariance subtype rule for extension types. Add rule that it is an
2023
error for an extension type member to be abstract. Mention that it is
@@ -704,6 +707,13 @@ declaration is abstract.
704707
resolved, and abstract members only make sense in the case where the given
705708
member is resolved at run time.*
706709

710+
It is a compile-time error if an extension type has a getter named `g` with
711+
return type `R` and a setter named `g=` with parameter type `S`,
712+
and `R` is not a subtype of `S`.
713+
714+
*This rule is applicable to instance getters and setters as well as static
715+
getters and setters.*
716+
707717
*It is not an error for an extension type member to have the modifier
708718
`external`. As usual, an implementation can report a compile-time error for
709719
external declarations, e.g., if they are not bound to an implementation,

0 commit comments

Comments
 (0)