Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Not A Problem
-
2.5.0, 2.5.1, 2.5.2, 2.5.3
-
None
-
None
-
macOS 10.14
OpenJDK 1.8.0_181-b02
Description
If you define a trait with generic type T and have a static method that return that type, compilation will fail with the following message:
Error:(5, 5) Groovyc: unable to resolve class T
Simple code for reproducing this bug:
trait MyTrait<T extends List> { static T myMethod() { return [1, 2, 3] } }
Groovy 2.4.x does not have this issue, from my testing this only happen in 2.5.x