Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop reporting the getter/setter type error #58578

Open
eernstg opened this issue Nov 19, 2024 · 5 comments
Open

Stop reporting the getter/setter type error #58578

eernstg opened this issue Nov 19, 2024 · 5 comments
Labels
area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). implementation Track the implementation of a specific feature (use on area-meta issue, not issues for each tool)

Comments

@eernstg
Copy link
Member

eernstg commented Nov 19, 2024

Based on dart-lang/language#2809, the error which is reported when a getter has a return type which is not a subtype of the parameter type of the corresponding setter should no longer be reported. That is, this situation is no longer an error.

Subtasks:

This change needs to be language versioned because it enables certain declarations that weren't previously allowed.

@bwilkerson, @johnniwinther, can you suggest a good schedule for doing this?

@eernstg eernstg added area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). implementation Track the implementation of a specific feature (use on area-meta issue, not issues for each tool) labels Nov 19, 2024
@johnniwinther
Copy link
Member

For the CFE this is a fairly simple change which we could include in 3.8. (We are too close to 3.7 beta 2 cutoff).

@bwilkerson
Copy link
Member

Removing the reporting of this diagnostic should be very little work. I'm comfortable committing to the 3.8 build.

This change needs to be language versioned because ...

And also so that the CFE and analyzer are in sync with each other. It would be bad for users if one reported an error when the other didn't.

@lrhn
Copy link
Member

lrhn commented Nov 21, 2024

It's a language versioned change, so the release will be synchronized no matter when it can be done.

@chloestefantsova
Copy link
Contributor

The CL creating the flag is in review: https://dart-review.googlesource.com/c/sdk/+/396581

@eernstg
Copy link
Member Author

eernstg commented Nov 21, 2024

That's great, thanks!

copybara-service bot pushed a commit that referenced this issue Nov 22, 2024
Part of #58578

Change-Id: I819d4b86761f60d59a8aa95a1dfba1c280499992
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396581
Reviewed-by: Michael Thomsen <[email protected]>
Reviewed-by: Erik Ernst <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Reviewed-by: Johnni Winther <[email protected]>
Commit-Queue: Chloe Stefantsova <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). implementation Track the implementation of a specific feature (use on area-meta issue, not issues for each tool)
Projects
None yet
Development

No branches or pull requests

5 participants