Groovy
  1. Groovy
  2. GROOVY-921

use maps analagous to lists in implicit ctors on 'as' enforced coercion

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0-JSR-2
    • Fix Version/s: 1.0
    • Component/s: syntax
    • Labels:
      None

      Description

      lists allow implicit ctors on enforce type coercion with the 'as' keyword

      [100,200] as Dimension

      maps are used for named parameters in ctors like
      new Dimension(x:100, y:200)

      just as a matter of completeness it would be logical to also provide

      [x:100, y:200] as Dimension

      Test:
      assert new Dimension(x:100, y:200) == [x:100, y:200] as Dimension

        Activity

        Dierk König created issue -
        Paul King made changes -
        Field Original Value New Value
        Assignee Paul King [ paulk ]
        Hide
        Paul King added a comment -

        Should work now in HEAD

        Show
        Paul King added a comment - Should work now in HEAD
        Paul King made changes -
        Fix Version/s 1.0-final [ 10244 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Paul King added a comment -

        Dierk, let me know if you want me to back this out until 1.1. Just trying to pick off some easy to close Jira issues before 1.0. Jochen has also suggested a better way to do this so I can back out this code and put in the new code in later if you want.

        Show
        Paul King added a comment - Dierk, let me know if you want me to back this out until 1.1. Just trying to pick off some easy to close Jira issues before 1.0. Jochen has also suggested a better way to do this so I can back out this code and put in the new code in later if you want.
        Hide
        Dierk König added a comment -

        Hi Paul, I'm fine with putting it into 1.0. It does not invalidate anything in the book, it only makes it less complete.

        Show
        Dierk König added a comment - Hi Paul, I'm fine with putting it into 1.0. It does not invalidate anything in the book, it only makes it less complete.
        Hide
        Paul King added a comment -

        No further feedback, assuming fixed

        Show
        Paul King added a comment - No further feedback, assuming fixed
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12730070 ] Default workflow, editable Closed status [ 12742043 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12968539 ] Default workflow, editable Closed status [ 12976245 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        529d 17h 24m 1 Paul King 08/Dec/06 19:52
        Resolved Resolved Closed Closed
        292d 39m 1 Paul King 26/Sep/07 21:32

          People

          • Assignee:
            Paul King
            Reporter:
            Dierk König
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development