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

Eric Milles resolved GROOVY-11225.
----------------------------------
    Fix Version/s: 5.0.0-alpha-3
         Assignee: Eric Milles
       Resolution: Fixed

https://github.com/apache/groovy/commit/9d0add89a04d5761db4e9c280550f0f415434195

> shouldFail return type
> ----------------------
>
>                 Key: GROOVY-11225
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11225
>             Project: Groovy
>          Issue Type: Improvement
>          Components: groovy-test
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 5.0.0-alpha-3
>
>
> The declaration of {{GroovyAssert}} shouldFail and shouldFailWithCause could 
> be improved to return the given type.  For example:
> {code:java}
>     public static Throwable shouldFail(Class clazz, Closure code) {
>       // ...
>     }
> {code}
> could be written as:
> {code:java}
>     public static <T extends Throwable> T shouldFail(Class<T> type, Closure 
> code) {
>     }
> {code}
> This should not change the erasure type of the method, so it should not 
> require a bridge method to maintain binary compatibility.



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

Reply via email to