chapel-lang/chapel — pull request #196 by hildeth (2014-08-22 19:54:51+00:00)
Title: Fix record in record bug

This patch provides a workaround for the "record-in-record bug" demonstrated by 6 futures in the users/ferguson/nested directory. The tests were failing due to a mismatch between internally-generated constructor calls and the signature of the constructor for a nested record type. Constructors for top-level record types are "free" functions, while those for nested record types are methods.

The fix was to special-case calls to nested record constructors and make them look like method calls. This resolves the problem, and causes those test cases to exhibit the expected behavior. The corresponding .future files were removed.

This patch is considered a workaround because the signature of the nested record's constructor was left inconsistent with the constructor signature for top-level record declarations. On the other hand, the long-term intention is to convert all constructors back to methods, so using the nested constructors as-is could be considered to be strictly correct.