Skip to content

throwError only works with Any #49

@t-unit

Description

@t-unit

When using:

expect(subject).[last|first|array].to(throwError())

the tests only compile if the element used is Any. Otherwise you get a compilation error.

So

let subject = ReplaySubject<**Any**>.createUnbounded()
subject.onError(AnyError.any)

expect(subject).first.to(throwError())

works.

While

let subject = ReplaySubject<**String**>.createUnbounded()
subject.onError(AnyError.any)

expect(subject).first.to(throwError())

proceses: Instance method 'to(_:description:)' requires the types 'String' and 'Any' be equivalent

This issue seems closely related to #38

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions