Skip to content

Commit

Permalink
Add missing getter/setter type rule (#3338)
Browse files Browse the repository at this point in the history
  • Loading branch information
eernstg authored Sep 11, 2023
1 parent b7e86ca commit b77ed81
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions accepted/future-releases/extension-types/feature-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ information about the process, including in their change logs.
[1]: https://github.com/dart-lang/language/blob/master/working/1426-extension-types/feature-specification-views.md
[2]: https://github.com/dart-lang/language/blob/master/working/extension_structs/overview.md

2023.09.11
- Add missing rule about getter/setter signature correspondence.

2023.08.17
- Add covariance subtype rule for extension types. Add rule that it is an
error for an extension type member to be abstract. Mention that it is
Expand Down Expand Up @@ -704,6 +707,13 @@ declaration is abstract.
resolved, and abstract members only make sense in the case where the given
member is resolved at run time.*

It is a compile-time error if an extension type has a getter named `g` with
return type `R` and a setter named `g=` with parameter type `S`,
and `R` is not a subtype of `S`.

*This rule is applicable to instance getters and setters as well as static
getters and setters.*

*It is not an error for an extension type member to have the modifier
`external`. As usual, an implementation can report a compile-time error for
external declarations, e.g., if they are not bound to an implementation,
Expand Down

0 comments on commit b77ed81

Please sign in to comment.