Skip to content

"incompatible types" warning when running tests #705

@jchristgit

Description

@jchristgit

Running the tests yields the following typing violation:

warning: incompatible types given to Nostrum.ConsumerGroup.dispatch/2:

        Nostrum.ConsumerGroup.dispatch(:noop, bot_name)

    given types:

        :noop, dynamic()

    but expected one of:

        #1
        dynamic(non_empty_list(term(), term())), dynamic()

        #2
        empty_list(), dynamic()

    where "bot_name" was given the type:

        # type: dynamic()
        # from: test/nostrum/consumer_group_test.exs:55:52
        %{bot_name: bot_name}

    typing violation found at:
57 │         ConsumerGroup.dispatch(:noop, bot_name)
    │                       ~
    │
    └─ test/nostrum/consumer_group_test.exs:57:23: Nostrum.ConsumerGroupTest."test inline awaiting raises on dispatching malformed events"/1

Not sure where this is coming from, maybe a new compiler warning or the new type system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions