ajwang / groovypptest

Automatically exported from code.google.com/p/groovypptest
0 stars 0 forks source link

Dynamic putAt() not working with MIXED mode #316

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  twitterCache[springSecurityService.principal.username] = messages
2. where twitterCache is a dynamically typed object

What is the expected output? What do you see instead?

The putAt() method should be called on the twitterCache instance, but instead I 
get

  [groovyc] Compiling 1 source file to /Users/pledbrook/dev/tools/git/grails-samples/grailstwitter/target/classes
  [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  [groovyc] .../grails-samples/grailstwitter/grails-app/controllers/org/grails/twitter/StatusController.groovy: 53: Assignment operator is applicable only to variable or property or array element
  [groovyc]  @ line 53, column 13.
  [groovyc]                twitterCache[springSecurityService.principal.username] = messages
  [groovyc]                ^
  [groovyc] 
  [groovyc] 1 error

What version of the product are you using? On what operating system?

0.4.91

Original issue reported on code.google.com by p.ledbr...@gmail.com on 24 Nov 2010 at 12:14

GoogleCodeExporter commented 8 years ago
What is definition of twitterCache variable?
def twitterCache?

Original comment by alex.tka...@gmail.com on 24 Nov 2010 at 12:21

GoogleCodeExporter commented 8 years ago
Yes. The same problem exists with the 'request' dynamic property in controllers:

    request['renderView'] = true

Original comment by p.ledbr...@gmail.com on 24 Nov 2010 at 1:02

GoogleCodeExporter commented 8 years ago

Original comment by alex.tka...@gmail.com on 24 Nov 2010 at 6:14