Groovy
  1. Groovy
  2. GROOVY-2178

Shell can not handle multi-line list defs

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.6, 2.2.0-beta-1
    • Fix Version/s: None
    • Component/s: Groovysh
    • Labels:

      Description

      Things like this, while valid Groovy, don't eval in groovysh:

      a = [
          1,
          2,
          3
      ]
      

      Pukes up something like:

      groovy:000> a = [
      groovy:001> 1,
      groovy:002> 2,
      groovy:003> 3
      ERROR org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, groovysh_parse: 4: unexpected token: 3 @ line 4, column 1.
         3
         ^
      
      1 error
      

      Though this works:

      a = [
          1,
          2,
          3,
      ]
      

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Jason Dillon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development