Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.0, 2.2.3, 2.4.0-beta-3
-
None
Description
class A{} class B{} @groovy.transform.CompileStatic class Helper<V extends A> { public Helper(Closure<V> cl) {} } @groovy.transform.CompileStatic static <C extends B> void extensionMethod(Closure<C> cl) { new Helper<C>(cl) }
The example is inspired by the fix done for GROOVY-6657, not sure versions before are affected, since this kind of code failed before. So it might be seen as regression.
Anyway, the code above should not compile, since Helper cannot extend A and B at the same time.