Skip to content

fix: duplicated-parser-AST - #7

Merged
falood merged 1 commit into
elixir-maru:mainfrom
feng19:main
Aug 6, 2026
Merged

falood merged 1 commit into
elixir-maru:mainfrom
feng19:main

Conversation

@feng19

@feng19 feng19 commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Surfaced by the Elixir 1.20.2 / OTP 29 upgrade — the compiler's type checker reports

Symptom

warning: the following clause will never match:

    {:ok, value} ->

because it attempts to match on the result of:

    value

which has type:

    dynamic(empty_list() or non_empty_list(term(), term()))

type warning found at:
  8 │ defmodule XxxWeb.V2.XxxController do
    └─ (xxx 0.1.0) lib/xxx_web/controllers/v2/xxx_controller.ex:8:
       XxxWeb.V2.XxxController.xxx/2

The trigger is a params declaration that chains a parser function into List, e.g.

requires :uuids, (&{:ok, List.wrap(&1)}) |> List[String]
requires :data, (&{:ok, List.wrap(&1)}) |> List do ... end

@falood
falood merged commit a0eb00a into elixir-maru:main Aug 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants