groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Sun (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GROOVY-8083) Fails to implement interface
Date Wed, 08 Feb 2017 08:14:41 GMT

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

Daniel Sun updated GROOVY-8083:
-------------------------------
    Description: 
I tried to extend GroovyCodeVisitor to support visiting lambda expression( https://github.com/danielsun1106/groovy/commit/609319ba60d6198e96028659461f080e58965aa6
), but AstNodeToScriptVisitor fails to implement the interface GroovyCodeVisitor. 

Even if visitLambdaExpression is implemented by AstNodeToScriptVisitor( https://github.com/danielsun1106/groovy/commit/17c6bf12a096fda47d956035f84999c9666b14af
), but still failed to compile, so I have to provide a default implementation for visitLambdaExpression
method( https://github.com/danielsun1106/groovy/commit/cfb3e50df5490a91099cfc8cf1b9f12a9d891108
)...

Error messages( https://travis-ci.org/danielsun1106/groovy/builds/199517082 ):
{code}
/home/travis/build/danielsun1106/groovy/subprojects/groovy-parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/util/AstDumper.groovy:
85: Can't have an abstract method in a non-abstract class. The class 'org.apache.groovy.parser.antlr4.util.AstNodeToScriptVisitor'
must be declared abstract or the method 'void visitLambdaExpression(org.codehaus.groovy.ast.expr.LambdaExpression)'
must be implemented.

 @ line 85, column 1.

   class AstNodeToScriptVisitor extends CompilationUnit.PrimaryClassNodeOperation implements
GroovyCodeVisitor, GroovyClassVisitor {

   ^

1 error

 FAILED
{code}

  was:
I tried to extend GroovyCodeVisitor to support visiting lambda expression( https://github.com/danielsun1106/groovy/commit/609319ba60d6198e96028659461f080e58965aa6
), but AstNodeToScriptVisitor fails to implement the interface GroovyCodeVisitor. 

Even if visitLambdaExpression is implemented by AstNodeToScriptVisitor( https://github.com/danielsun1106/groovy/commit/17c6bf12a096fda47d956035f84999c9666b14af
), but still failed to compile, so I have to provide a default implementation for visitLambdaExpression
method...

Error messages( https://travis-ci.org/danielsun1106/groovy/builds/199517082 ):
{code}
/home/travis/build/danielsun1106/groovy/subprojects/groovy-parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/util/AstDumper.groovy:
85: Can't have an abstract method in a non-abstract class. The class 'org.apache.groovy.parser.antlr4.util.AstNodeToScriptVisitor'
must be declared abstract or the method 'void visitLambdaExpression(org.codehaus.groovy.ast.expr.LambdaExpression)'
must be implemented.

 @ line 85, column 1.

   class AstNodeToScriptVisitor extends CompilationUnit.PrimaryClassNodeOperation implements
GroovyCodeVisitor, GroovyClassVisitor {

   ^

1 error

 FAILED
{code}


> Fails to implement interface
> ----------------------------
>
>                 Key: GROOVY-8083
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8083
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 3.0
>         Environment: java version "1.8.0_121"
>            Reporter: Daniel Sun
>
> I tried to extend GroovyCodeVisitor to support visiting lambda expression( https://github.com/danielsun1106/groovy/commit/609319ba60d6198e96028659461f080e58965aa6
), but AstNodeToScriptVisitor fails to implement the interface GroovyCodeVisitor. 
> Even if visitLambdaExpression is implemented by AstNodeToScriptVisitor( https://github.com/danielsun1106/groovy/commit/17c6bf12a096fda47d956035f84999c9666b14af
), but still failed to compile, so I have to provide a default implementation for visitLambdaExpression
method( https://github.com/danielsun1106/groovy/commit/cfb3e50df5490a91099cfc8cf1b9f12a9d891108
)...
> Error messages( https://travis-ci.org/danielsun1106/groovy/builds/199517082 ):
> {code}
> /home/travis/build/danielsun1106/groovy/subprojects/groovy-parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/util/AstDumper.groovy:
85: Can't have an abstract method in a non-abstract class. The class 'org.apache.groovy.parser.antlr4.util.AstNodeToScriptVisitor'
must be declared abstract or the method 'void visitLambdaExpression(org.codehaus.groovy.ast.expr.LambdaExpression)'
must be implemented.
>  @ line 85, column 1.
>    class AstNodeToScriptVisitor extends CompilationUnit.PrimaryClassNodeOperation implements
GroovyCodeVisitor, GroovyClassVisitor {
>    ^
> 1 error
>  FAILED
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message