Semantic Diff

#8935 Parse a switch guard that calls a function named async

1 commit, drawn from its message.

d19633d38ce7f8850e138913ffa24a8bf6327465..pr-8935

936b348b9 · Christoph Knittel · Oct 20, 2026

Parse a switch guard that calls a function named async

Why

The async arrow lookahead also ran in guards, where the case's => follows the guard, so if async(x) => was read as an async arrow.

Async arrows now skip the lookahead in the positions where other arrows already do: guards and conditions. Fixes #8933.

modifiedAST switch guard

let async = x => x > 0let f = v =>  switch v {  | Some(x) if async(x) => 1  | _ => 0  }
diagnostic
Before
Did you forget a `=>` here?
expanded
After
let f [arity:1]v =├─ match v with├─ | Some x when async x -> 1└─ | _ -> 0
with Claude Opus 5.5