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
Did you forget a `=>` here?expanded
let f [arity:1]v =├─ match v with├─ | Some x when async x -> 1└─ | _ -> 0