[ 
https://issues.apache.org/jira/browse/GROOVY-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Sun updated GROOVY-3524:
-------------------------------
    Fix Version/s: 7.0.0-alpha-1

> MultipleCompilationErrorsException "unexpected char"
> ----------------------------------------------------
>
>                 Key: GROOVY-3524
>                 URL: https://issues.apache.org/jira/browse/GROOVY-3524
>             Project: Groovy
>          Issue Type: Bug
>          Components: command line processing
>    Affects Versions: 1.6.1, 1.6.2, 1.6.3
>         Environment: Linux (RHEL 5, Fedora Core 5)
>            Reporter: Mike Dillon
>            Assignee: Daniel Sun
>            Priority: Minor
>             Fix For: 7.0.0-alpha-1
>
>
> Getting an error in groovy one-liners:
> {noformat}
> $ groovy -e 'println "Hello, World!"'
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed, script_from_command_line: 1: unexpected char: 0xFFFF @ line 1, column 
> 23.
> 1 error
> {noformat}
> Putting the same thing in a file works fine. It doesn't happen for the 
> following:
> {noformat}
> $ groovy -e 'println '\''Hello, World!'\'
> $ groovy -e 'println "Hello, World!";'
> $ groovy -e 'println "";'
> $ groovy -e ''
> $ groovy -e 'println 1'
> $ groovy -e 'println System.properties'
> {noformat}
> When you use a zero-length string literal, you get a slightly different error:
> {noformat}
> $ groovy -e 'println ""'
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed, script_from_command_line: 1: unexpected char: '"' @ line 1, column 9.
> 1 error
> {noformat}



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to