Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Support protocol inheritance #88

Open
vinivendra opened this issue Aug 25, 2020 · 2 comments
Open

Support protocol inheritance #88

vinivendra opened this issue Aug 25, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@vinivendra
Copy link
Owner

Kotlin, like Swift, supports protocol inheritance. It would be useful to analyze and compare the feature in the two languages and see which cases can be translated correctly.

@rlinoz
Copy link

rlinoz commented Dec 18, 2020

I am needing this feature, so I guess I could help, if you give me an idea from where to start

@vinivendra
Copy link
Owner Author

Hi! I took a look at this today and it doesn't look like it's gonna cause many problems. The implementation should be pretty simple. Maybe something like:

  1. Add an inheritances property to the ProtocolDeclaration class (like the one we have in ClassDeclaration).
  2. Put the inherited protocols in the property in both SwiftSyntaxDecoder.swift and SwiftTranslator.swift (again, just like with ClassDeclaration).
  3. Fix any build errors that show up in TranspilationPass.swift.
  4. Add the inheritances to the Kotlin code in KotlinTranslator.swift.

If you want to try an implementation, go ahead! If you have any problems, just let me know. Otherwise, I may be able to do this next weekend. Feel free to ping me if I forget.

@IgorMaineti IgorMaineti mentioned this issue Dec 22, 2020
4 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants