Last active 2 years ago

  1. 2 years ago
    Tue 17 Jan 2017 01:12:59 AM CET

    Please help translate following Java code into Swift 3:

    interface A {
    class BiA implements A {
    interface C {
        List<? extends A> getAs();
    class D implements C {
        List<BiA> getAs();

    The problem I'm facing is with protocol C. I don't know how to declare the protocol, I don't know how to represent "? extends A" in Swift. I'm happy to use built-in Swift arrays. All I want is to be able to use class BiA in D where the getAs() implements the protocol method from C. It's odd that such a simple construct is so hard to get an answer for, not in any Apple guides nor in any forums.

  2. Tue 17 Jan 2017 01:09:52 AM CET
    nishal.thomas.g joined the forum.