[swift2objc] Support Swift extension declarations#3236
[swift2objc] Support Swift extension declarations#3236Hassnaa9 wants to merge 3 commits intodart-lang:mainfrom
Conversation
3dd7829 to
9e69a3d
Compare
| ...generateInitializer(declaration.wrapperInitializer, isPublic: false), | ||
| for (final init in declaration.initializers) | ||
| ..._generateInitializer(init, isPublic: true), | ||
| ...generateInitializer(init, isPublic: true), |
There was a problem hiding this comment.
I made _generateClassMethod, _generateClassProperty, and _generateInitializer public, so that extension_generator.dart could reuse them directly instead of duplicating the same logic.
PR HealthBreaking changes ✔️
This check can be disabled by tagging the PR with Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with |
|
@liamappelbe I tried to fix the "designated initializer cannot be declared in an extension" failure by adding convenience to initializers generated inside @objc extension blocks. This error didn't appear locally because I'm on Linux i think. Could you please rerun the CI? |
|
@Hassnaa9 If this is ready for review, click the request review button in the top right. |
|
@liamappelbe Yes it's ready, but i can't find the button |

Support Swift extension declarations by routing members with a swiftExtension
field into ExtensionDeclaration nodes during parsing, then transforming and
generating them as @objc extension { ... } blocks.
Fixes: #1815