-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Implicitly tear off call
from receiver whose type is a type variable
#54351
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
Should we also handle access of
|
I do not think we should support an implicit invocation of a |
So we still restrict this to finding a |
Yes. It is highly likely that support for On the other hand, there's no reason to start introducing support for statically resolved implicit We do have a somewhat similar situation with dynamic calls where implicit |
I think both front-ends have landed a fix. OK to close, @eernstg ? |
Sounds good, thanks! |
Thanks to @johnniwinther for noticing this. Consider the following program:
This program is rejected by the analyzer as well as the common front end (DartPad based on SDK 3.3.0-213.0.dev). However, the interface of a receiver of type
X
is the interface of the boundA
, which implies that the interface ofx
does include a method namedcall
, which means that we should be able to tear it off implicitly when the context type isFunction
or a function type.The missing support for
call
is concerned with implicit tear-offs only, the implicit insertion ofcall
that enables an invocation is working in the analyzer as well as the CFE.The text was updated successfully, but these errors were encountered: