groovy

println /hello/ results in unexpected token exception

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.1-beta-2
  • Fix Version/s: 1.1-rc-1
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP, JVM: 1.4.2_11-b06, Ubuntu 7.04 Feisty Fawn
  • Number of attachments :
    0

Description

I tried using slashy strings in the groovyConsole

println /hello/

and was rewarded with the error:

Exception thrown: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script9: 1: unexpected token: null @ line 1, column 16.

I also tried it in groovysh and just was told "statement not complete"

it works if I do this:

println(/hello/)

Activity

Hide
Russel Winder added a comment -

This problem remains in Groovy r7025 (1.1-beta-3, 2007-07-26). Also:

> groovy -e 'println /hello/'
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, script_from_command_line: 1: unexpected token: null @ line 1, column 16.
1 error

I believe all of these are probably presentations of the same error.

Show
Russel Winder added a comment - This problem remains in Groovy r7025 (1.1-beta-3, 2007-07-26). Also:
> groovy -e 'println /hello/' org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, script_from_command_line: 1: unexpected token: null @ line 1, column 16. 1 error
I believe all of these are probably presentations of the same error.
Hide
blackdrag blackdrag added a comment -

it conflicts with normal division. we can have only one.. either "println a/b" or "println /a/". so I close this as won't fix

Show
blackdrag blackdrag added a comment - it conflicts with normal division. we can have only one.. either "println a/b" or "println /a/". so I close this as won't fix

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: