diff --git a/lib/expand.ml b/lib/expand.ml index bdb65d1..ddfe51b 100644 --- a/lib/expand.ml +++ b/lib/expand.ml @@ -283,12 +283,11 @@ let split_amp (items : Form.t list) : Form.t list * (string * Loc.t) option = in go [] items +(* Never handed a [&]: every list of items reaching here has been through + [split_amp], which stops at the first one and refuses every way of getting + the tail wrong itself. So there is no arm for it and no sentence about it. *) let rec pat_of (f : Form.t) : pat = match f.Form.v with - | Form.Sym "&" -> - (* Only reachable inside a [ ] that [split_amp] already walked, so a second - [&] is the one that has no name of its own to go with. *) - Loc.fail f.Form.loc "& appears twice in this parameter list" | Form.Sym s -> Pname (s, f.Form.loc) | Form.Vec items -> let elems, rest = split_amp items in