Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
I have the following code
import java.util.function.Supplier; class A { public String x; } public class B<T extends A, X extends Supplier<T>> { void test(T p) { p.x = "str"; } }
Actual behavior
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: test.groovy: 12: [Static type checking] - No such property: x for class: T @ line 12, column 5. p.x = "str"; ^ 1 error
Expected behavior
Compile successfully
Notes: This error occurs only when there is a second bounded type parameter in class B, and the first type parameter (i.e., T) is used there.
Tested against master (commit: 2095b9eb3b73c5bcf27625395c24fa5210890443)