NTAs do not contribute to collections

Issue #275 invalid
Axel Mårtensson created an issue

NTAs do not contribute to collection attributes because they do not participate in the survey I have made a test that exposes this in a new branch nta-contrib-coll in my fork of jastadd-test. Would it be useful to have NTAs contributing to collections?

Comments (6)

  1. Jesper Mattsson

    This is a bit unclear, since you might not want to expand previously unexpanded NTAs for collection attributes. I'd say it depends on the situation what you'd want here.

  2. Jesper Öqvist

    NTAs can contribute to a collection if you use this version of the contributes declaration:

    N1 contributes nta getMyNta() to N2.a();
    

    In the test case you linked, you could use this:

    A contributes nta b() to A.integers();
    

    This is documented in the reference manual.

    The feature was added in version 2.2.1.

    Also, we have tests for this in the test suite. For example coll/custom_survey_07.

  3. Log in to comment