-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[jsinterop] enforce additional restrictions on @staticInterop classes #49350
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
Since js_bindings is one of the biggest users of this feature, do you see any of the above being major issues? |
no @srujzs. It seems I will only have to adjust to use |
Great, thanks! |
dart-lang/sdk#49350 will disallow generative constructors in @staticInterop classes in the near future.
dart-lang/sdk#49350 will disallow generative constructors in @staticInterop classes in the near future.
@sigmundch Should we language version these checks? It might help avoid breaking users' code. Also, I believe you've added this check:
but only for static members possibly? Do we see us needing to do this for instance/extension members as well? |
Bug: #49350 Checks to see that external extension members on `@staticInterop` types do not declare or use a type parameter. Change-Id: Id8646b599094b748c5490810b64d872065676014 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254103 Reviewed-by: Sigmund Cherem <[email protected]> Commit-Queue: Srujan Gaddam <[email protected]> Reviewed-by: Joshua Litt <[email protected]>
We no longer are requiring a single extension per |
Per the last comment, I think we can close this issue as complete. That said, we are in the process of making the type-parameter check more lax, and allow certain generic patterns. |
We'd like to enforce some limitations to ensure the design of staticInterop classes matches static views (the future language feature that will be used to implement JSInterop in the future.) and supports the needs of JSinterop overall.
Some checks may include:
.
delimiters in renaming for non-top level members if such a restriction does not exist alreadyThe text was updated successfully, but these errors were encountered: