[pkg:js] Disallow users from using synthetic constructors for @staticInterop #49941
Labels
area-web-js
Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.
web-js-interop
Issues that impact all js interop
Uh oh!
There was an error while loading. Please reload this page.
Currently, users can write interop classes and call synthetic constructors and they will hit no checks. In the Wasm case, generative constructors are a pain point, so a synthetic constructor should be disallowed. Synthetic constructors should compile to the same code as factories with and without the
@anonymous
annotation. We should check for invocations of synthetic constructors and disallow them and advise them to use non-synthetic constructors instead.Related:
#48730
#49350
cc @sigmundch @joshualitt
The text was updated successfully, but these errors were encountered: