[
https://issues.apache.org/jira/browse/GROOVY-10365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-10365:
---------------------------------
Fix Version/s: 4.0.3
> STC does not perform boxing when overriding method using a parameterized
> class with bounded type parameters
> -----------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-10365
> URL: https://issues.apache.org/jira/browse/GROOVY-10365
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Reporter: Thodoris Sotiropoulos
> Assignee: Eric Milles
> Priority: Major
> Fix For: 5.0.0-alpha-1, 4.0.3
>
>
> I have the following program
> {code:java}
> interface I {
> double m(Integer x);
> }
> class A<T extends Number, Y> implements I {
> public double m(Integer x) {
> return 10.0;
> }
> }
> class B<T extends I> {
> public int f;
> double m2(A<Float, ? extends T> x) {
> return x.m(f);
> }
> }
> {code}
> h3. Actual behaviour
> {code}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed:
> test.groovy: 15: [Static type checking] - Cannot call A#m(java.lang.Integer)
> with arguments [int]
> @ line 15, column 12.
> return x.m(f);
> ^
> 1 error
> {code}
> h3. Expected behaviour
> Compile successfully
> Tested against master.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)