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

this[offset] is not considered modifiable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-5
    • 1.0-JSR-5
    • parser
    • None

    Description

      Notes from Greg Barr:

      > Caught: fancy.groovy: 8: could not use '=' at 5:37; left-hand-side of
      > assignment must be modifiable
      > ... stack trace ...
      > putAt works fine, but I was just curious why using 'this' produced the
      > error above.
      >
      > class FancyExpando extends Expando {
      > FancyExpando(args)

      { super(args) }

      > update(args)

      { > //for (e in args) putAt(e.key, e.value) // works fine > for (e in args) this[e.key] = e.value // error using 'this' > }

      > String toString()

      { dump() }

      > }

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            cpoirier Chris Poirier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: