Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6689

Support pre/postfix operations in traits

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.0-beta-1
    • None
    • None

    Description

      The current implementation of traits do not allow the use of pre/postfix operations in traits on fields or properties which are defined within the trait. It is however possible to use the += operator.

      The difficult part is that unlike +=, pre/postfix operations return a value, and it's hard to have something which is rewritable while being still statically compilable and without changing the semantics of the code.

      Attachments

        Activity

          People

            Unassigned Unassigned
            melix Cédric Champeau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: