On Tue, 29 Mar 2016, Prathamesh Kulkarni wrote: > Hi, > I suppose we should reject duplicate captures used as "arguments" in user > defined predicates ? > eg: > (match (foo @0 @0) > match-template) > The attached patch prints error "duplicate capture id" for above pattern. > Bootstrapped+tested on x86_64-pc-linux-gnu. > Ok for trunk ?
Using a duplicate probably doesn't make sense but it works just fine. You get res_args[0] == res_args[1] == @0 in the above case. Richard.