Skip to content

Fix functions with impossible clauses typecheck crash - #15794

Open
AlexGx wants to merge 1 commit into
elixir-lang:mainfrom
AlexGx:ag-impossible_fun_clause-fix
Open

Fix functions with impossible clauses typecheck crash#15794
AlexGx wants to merge 1 commit into
elixir-lang:mainfrom
AlexGx:ag-impossible_fun_clause-fix

Conversation

@AlexGx

@AlexGx AlexGx commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #15793

This change returns an uncallable fun(arity) type for that case, preserving the existing behavior whenever at least one domain is reachable.

Cases covered:

  • anonymous functions
  • local function captures
  • cross-module remote captures
  • empty domains at multiple arities

Assisted-by: GPT-5.6 Sol

@josevalim
josevalim requested a review from gldubc August 25, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Type checker crashes when all function clauses have impossible domains

1 participant