Skip to content

Spy on protocol that confirms another protocol #47

Open
@ghost

Description

Is your feature request related to a problem? Please describe.
When using @Spyable macro on protocol that confirms another protocol, there is no additional methods of confirmed protocol, which leads to compilation error. Eg:

protocol A {
    func a()
}

@Spyable
protocol B: A {
    func b() 
}

class BSpy: B {
    var bCallsCount = 0
    var bCalled: Bool {
        return bCallsCount > 0
    }
    var bClosure: (() -> Void)?
        func b() {
        bCallsCount += 1
        bClosure?()
    }
}

Describe the solution you'd like
Would be great to have confirmed protocol methods in Spy class

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions