Saravanan created GROOVY-11660:
----------------------------------

             Summary: Variables declared on multiple lines cause an ANTLR error
                 Key: GROOVY-11660
                 URL: https://issues.apache.org/jira/browse/GROOVY-11660
             Project: Groovy
          Issue Type: Improvement
          Components: parser-antlr4
    Affects Versions: 5.0.0-alpha-12
            Reporter: Saravanan


This code fails during antlr parsing, but is valid Java code because of the ;
{code:java}
// code placeholder
class Blah {

    // This errors out early in the ANTLR phase
    public String
              myMemberVariable;

    public fn() {
        // This fails during static compile and produces unexpected results 
        // in script mode
        String 
            somethingElse = "BLAH";
    }
}{code}
The member variable declaration in unambiguous even in groovy parlance. Can 
this be fixed in the antlr parser? I can understand and fix the static compile 
error in the function in other ways, the first compile error however is too 
early for me to intercept



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to