Skip to content

[application.erl] redundant case statement #2

Description

@tank-bohr

https://github.com/erlang/otp/blob/34b56e8f566c6f1aa6023bb7b4096b8f2d709d9e/lib/kernel/src/application.erl#L229-L233

Should be moved to function guard

permit(_Application, Bool) when !is_boolean(Bool)
    exit({badarg, {?MODULE, permit, [Application, Bad]}});
permit(Application, Bool)
   ...

And we can do even better

permit(_Application, Bool) when is_boolean(Bool)
    ...

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