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

addition of two ranges fails

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • 1.0-beta-3
    • None
    • None

    Description

      This works :

      r = 1..4
      s = 11..14
      l = r + s

      But this

      l = 1..4 + 11..14

      yields the following exception :

      Caught: org.codehaus.groovy.syntax.parser.UnexpectedTokenException: null:1: one
      of { } expected but found ".."
      org.codehaus.groovy.syntax.parser.UnexpectedTokenException: null:1: one of { }
      expected but found ".."
      at org.codehaus.groovy.syntax.parser.Parser.throwExpected(Parser.java:18
      43)
      at org.codehaus.groovy.syntax.parser.Parser.primaryExpression(Parser.jav
      a:1345)
      at org.codehaus.groovy.syntax.parser.Parser.postfixExpression(Parser.jav
      a:1244)
      at org.codehaus.groovy.syntax.parser.Parser.unaryExpression(Parser.java:
      1233)
      at org.codehaus.groovy.syntax.parser.Parser.multiplicativeExpression(Par
      ser.java:1178)
      at org.codehaus.groovy.syntax.parser.Parser.additiveExpression(Parser.ja
      va:1148)
      at org.codehaus.groovy.syntax.parser.Parser.rangeExpression(Parser.java:
      1132)
      at org.codehaus.groovy.syntax.parser.Parser.relationalExpression(Parser.
      java:1072)
      at org.codehaus.groovy.syntax.parser.Parser.equalityExpression(Parser.ja
      va:1050)
      at org.codehaus.groovy.syntax.parser.Parser.logicalAndExpression(Parser.
      java:1034)
      at org.codehaus.groovy.syntax.parser.Parser.logicalOrExpression(Parser.j
      ava:1018)
      at org.codehaus.groovy.syntax.parser.Parser.conditionalExpression(Parser
      .java:995)
      at org.codehaus.groovy.syntax.parser.Parser.assignmentExpression(Parser.
      java:970)
      at org.codehaus.groovy.syntax.parser.Parser.expression(Parser.java:964)
      at org.codehaus.groovy.syntax.parser.Parser.statement(Parser.java:677)
      at org.codehaus.groovy.syntax.parser.Parser.typeDeclaration(Parser.java:
      171)
      at org.codehaus.groovy.syntax.parser.Parser.compilationUnit(Parser.java:
      79)
      at org.codehaus.groovy.classgen.CompilerFacade.parseClass(CompilerFacade
      .java:142)
      at org.codehaus.groovy.classgen.CompilerFacade.parseClass(CompilerFacade
      .java:84)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:101)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:229)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:210)
      at groovy.ui.InteractiveShell.run(InteractiveShell.java:100)
      at groovy.ui.InteractiveShell.main(InteractiveShell.java:71)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java:410)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:344)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            spullara Sam Pullara
            guillaume Guillaume Sauthier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment