Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support nested interfaces #1529

Open
jelemar opened this issue May 10, 2023 · 0 comments
Open

Support nested interfaces #1529

jelemar opened this issue May 10, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jelemar
Copy link

jelemar commented May 10, 2023

definition:

class Outer
{
  interface Listener
  {
    fun onEvent()
  }
}

generates correct nesting for java, but not swift. Listener protocol is generated as if it were not nested, with the name "Listener".
Currently, swift doesn't seem to support nested protocols. This may change in the future. But, even now, there may be a workaround. Maybe the above definition could generate something like this in swift:

public protocol OuterListener : AnyObject {
  ...
}
public class Outer {
  typealias Listener = OuterListener
}
@Hsilgos Hsilgos added the enhancement New feature or request label May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants