[ 
https://issues.apache.org/jira/browse/GROOVY-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17955456#comment-17955456
 ] 

ASF GitHub Bot commented on GROOVY-11685:
-----------------------------------------

daniellansun merged PR #2243:
URL: https://github.com/apache/groovy/pull/2243




> Static type checking fails with groovy 5.x
> ------------------------------------------
>
>                 Key: GROOVY-11685
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11685
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 5.0.0-beta-1
>            Reporter: Andriy Rysin
>            Assignee: Eric Milles
>            Priority: Major
>
> This project can compile and run under groovy-4 but fails static type 
> checking with groovy-5. I could not find what would be wrong with the code.
> [https://github.com/brown-uk/nlp_uk]
> {noformat}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> file:/home/user/nlp_uk/src/main/groovy/ua/net/nlp/tools/TextUtils.groovy: 
> 182: [Static type checking] - Cannot call 
> java.util.function.Consumer#call(capture-o
> f ? extends ua.net.nlp.tools.TextUtils.ResultBase) with arguments 
> [ua.net.nlp.tools.TextUtils$ResultBase]
>  @ line 182, column 6.
>                                         postProcessClosure(analyzed)
>         ^
> file:/home/user/nlp_uk/src/main/groovy/ua/net/nlp/tools/TextUtils.groovy: 
> 200: [Static type checking] - Cannot call 
> java.util.function.Consumer#call(capture-o
> f ? extends ua.net.nlp.tools.TextUtils.ResultBase) with arguments 
> [ua.net.nlp.tools.TextUtils$ResultBase]
>  @ line 200, column 4.
>                         postProcessClosure(analyzed)
>       ^
> file:/home/user/nlp_uk/src/main/groovy/ua/net/nlp/tools/tag/TagUnknown.groovy:
>  97: [Static type checking] - Incompatible generic argument types. Cannot 
> assign
>  java.util.List<java.lang.Object> to: 
> java.util.List<ua.net.nlp.tools.tag.TagTextCore.TaggedToken>
>  @ line 97, column 25.
>                retTokens = opToTagMap.collect { e ->
>                            ^
> file:/home/user/nlp_uk/src/main/groovy/ua/net/nlp/tools/tag/TagUnknown.groovy:
>  136: [Static type checking] - Incompatible generic argument types. Cannot 
> assig
> n java.util.List<? extends java.lang.Object> to: 
> java.util.List<ua.net.nlp.tools.tag.TagTextCore.TaggedToken>
>  @ line 136, column 16.
>            return retTokens
>                   ^
> {noformat}



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

Reply via email to