Skip to content

Support nested interfaces #1529

@jelemar

Description

@jelemar

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions