chapel-lang/chapel — pull request #236 by hildeth (2014-08-27 19:45:46+00:00)
Title: Fix config param future

This fix was fairly straightforward:

The test case includes an "if" clause that tests a param value. The conditional contains a record declaration. The record declaration will cause an autoCopy function to be generated for that record type. But resolution removes the "if" clause if the param value evaluates to false.

When that happens, the type declaration itself -- as well as any functions created ot support it -- are no longer in the tree. Thus, when resolving autoCopies, autoCopy functions that are not in the tree should be ignored.

An alternate solution would be to move resolution of autoCopy functions to a separate pass. Since the tree is cleaned between passes, this would allow removal of the special test code I just added.