chapel-lang/chapel — pull request #1050 by sbillig (2014-12-19 22:10:37+00:00)
Title: Fix multiple primitive query formals bug

Prior to this commit, `proc f(x:int(?a), y:int(?b)) {}` would crash the
compiler on the fn->defPoint->insertAfter call in
clone_for_parameterized_primitive_formals.

The `fixup_query_formals(newfn)` call was redundant. newfn is added to
gFnSymbols on creation, so fixup_query_formals will be called on it in
the loop over gFnSymbols in normalize() (line 122).

If fixup_query_formals is called twice on a FnSymbol with primitive
query formals, the second call will fail, because the first call results
in the FnSymbol's defPoint being removed from its parent list.