You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Mauro Molinari (Jira)" <ji...@apache.org> on 2022/05/05 14:39:00 UTC
[jira] [Commented] (GROOVY-10525) Regression in 2.5.16: Class>[] cannot be assigned to Class>...
[ https://issues.apache.org/jira/browse/GROOVY-10525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17532278#comment-17532278 ]
Mauro Molinari commented on GROOVY-10525:
-----------------------------------------
Any estimated release date for Groovy 2.5.17? I see there are a bunch of fixes in it already.
Thanks.
> Regression in 2.5.16: Class<?>[] cannot be assigned to Class<?>...
> ------------------------------------------------------------------
>
> Key: GROOVY-10525
> URL: https://issues.apache.org/jira/browse/GROOVY-10525
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Affects Versions: 2.5.16
> Reporter: Mauro Molinari
> Assignee: Eric Milles
> Priority: Major
> Fix For: 2.5.17
>
>
> Consider this example, where {{Validator}} comes from {{javax.validation:validation-api:1.1.0.Final}}:
> {code:groovy}
> package test
> import javax.validation.Validator
> import groovy.transform.CompileStatic
> @CompileStatic
> class TestValidator {
>
> Validator validator
>
> void foo(Object bean, List<Class<?>> groups) {
> validator.validate(validator, groups as Class<?>[])
> }
> }
> {code}
> The compilation of this class fails in 2.5.16 (but succeeds in 2.5.15-) with the following error:
> {noformat}
> /home/mauro/workspace/TestGroovyGradle2/src/main/groovy/test/TestValidator.groovy: 13: [Static type checking] - Cannot call <T> javax.validation.Validator#validate(T, java.lang.Class <java.lang.Object extends java.lang.Object>[]) with arguments [javax.validation.Validator, java.lang.Class <?>[]]
> @ line 13, column 4.
> validator.validate(validator, groups as Class<?>[])
> ^
> 1 error
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)