Skip to content

Compilation warning on Elixir 1.20+ due to stricter __STACKTRACE__ type inference #576

@chgeuer

Description

@chgeuer

Elixir 1.20.0-rc.1 introduced stricter type inference for __STACKTRACE__. This causes a "clause will never match" warning in lib/zig/error_prong.ex when pattern matching on the stacktrace structure.

The compiler infers a strict type for __STACKTRACE__ which conflicts with the pattern [{_m, _f, a, _}, {m, f, _a, opts} | rest] used in argument_error_prong/3 and return_error_prong/4, specifically regarding the type of opts.

This breaks CI/CD pipelines that treat warnings as errors.

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