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
}
definition:
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: