mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
833c70be61
Add a visitor that checks for invalid JS interop usage and reports diagnostics. Wire the visitor up to the `DevCompilerTarget` and `Dart2jsTarget`. - Add a message without an analyzer code for this error. In the long term we may want to also add it to analyzer. - Add a new package `_js_interop_checks` to share the kernel visitor between dart2js and ddc. Some of the code is copied from ddc, and in the long term we can centralize more of the detection of JS interop annotations to this package. - Implement the first check to detect definitions of `operator []` or `operator []=` which are not allowed in JS interop classes. Change-Id: I095a4b7f4732796dbc3cae55b32d5fc9bcdbd798 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130733 Commit-Queue: Nate Bosch <nbosch@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
78 B
78 B
Shared kernel visitors checking for incorrect usage of @JS()
style interop.