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

@Field cannot annotate a multiple assignment expression. throws a ClassCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8-beta-2
    • 1.8-beta-3
    • None
    • None

    Description

      @Field cannot annotate a multiple assignment expression. throws a ClassCastException

      This was found become because DeclarationExpression.getVariableExpression() was deprecated.

      A failing test case is:

      @groovy.transform.Field 
      def (awe, awe2) = [[1, 2, 3], [1, 2, 3]]
      
      def awesum() { awe.sum() }
      assert awesum() == 6
      

      Attachments

        Activity

          People

            paulk Paul King
            hamlet.darcy@canoo.com Hamlet D'Arcy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: