sdk icon indicating copy to clipboard operation
sdk copied to clipboard

[pkg:js] Disallow users from using synthetic constructors for @staticInterop

Open srujzs opened this issue 2 years ago • 0 comments

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. It is unclear what use of synthetic constructors compile to with and without the @anonymous annotation. Regardless, we should check for invocations of synthetic constructors and disallow them and advise them to use non-synthetic constructors instead.

Related:

https://github.com/dart-lang/sdk/issues/48730 https://github.com/dart-lang/sdk/issues/49350

cc @sigmundch @joshualitt

srujzs avatar Sep 09 '22 22:09 srujzs