-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Implement support for dynamic checks on parameters that are covariant-by-declaration due to inheritance #47072
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
Comments
Can you comment on the priority of this issue? Are we expecting the implementation changes to be part of the next release? |
I sent out email to @devoncarew and some team members in order to find a suitable milestone. |
(Reopening, I think we should only close this when all subtasks are closed.) |
Yes. I accidentally used the wrong issue number in the fix for #47074 |
@eernstg - we may be complete here? |
Yep! Closing. |
FYI, we bumped the analyzer issue out of the current stable milestone (and moved this meta issue as well). |
I believe this is now complete. |
Cf. dart-lang/language#925, consider the following program:
The class
D
will behave in such a way that the actual argument to itsf
method has its type checked dynamically. In other words, whenC.f
is inherited byD
, it is changed such that it's parameter is covariant-by-declaration. (This may be achieved by implicitly inducing a forwarding stub intoD
that callssuper.f(...)
, but it could also be done by other means.)This issue is concerned with the implementation of this feature. The tests added in https://dart-review.googlesource.com/c/sdk/+/208504 can be used as a guide.
This is not tied to a language version or a flag, because it only allows programs with errors to become running programs.
Subtasks:
The text was updated successfully, but these errors were encountered: