Skip to content

Get rid of MethodError: no method matching iterate(::Nothing) #632

@gdalle

Description

@gdalle

This frequent error happens because of the default dispatches

frule(ȧrgs, f, ::Vararg{Any}) = nothing
rrule(::Any, ::Vararg{Any}) = nothing

so when no rrule is defined, nothing is returned.
Unfortunately, it is hard to catch because the computations with nothing can go on for a while before erroring.

I wonder if removing these default dispatches would break something badly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakinga breaking change

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions