Community
Participate
Working Groups
Build Identifier: 20100917-0705 Trying to inspect even a simple variable in a double generic class fails. With "double generic class" I mean a class with two type parameters - haven't tried with 3 or more.. Inspector says: "Evaluations must contain either an expression or a block of well-formed statements" I have found no workaround for this.. Reproducible: Always Steps to Reproduce: Run this sample program Main, built using the following classes: public class Main { public static void main(String[] args) { GenericClassProcessor<T1, T2> proc = new GenericClassProcessor<T1, T2>(); GenericClass<T1, T2> processedItem = new GenericClass<T1, T2>(); proc.process(processedItem); } } public class GenericClassProcessor<AA extends I1, BB extends I2> implements GenericInterface<AA, BB> { @Override public void process(GenericClass<AA, BB> anInstance) { int i = 0; System.out.println("i = " + i); System.out.println(" ---- set breakpoint here ---- and try to inspect variables ---- "); } } public class GenericClass<AA extends I1, BB extends I2> { } public interface GenericInterface<AA extends I1, BB extends I2> { public void process(GenericClass<AA, BB> anInstance); } public interface I1 { } public interface I2 { } public class T1 implements I1 { } public class T2 implements I2 { }
Created attachment 201667 [details] Eclipse Project Test Case Eclipse Helios Project with Test Case reproducing the bug as described. Set breakpoint where indicated in class GenericClassProcessor and try to inspect (Ctrl+Shift+I) variables at that point. Every inspects fails, both on simple and generic variables.
I originally thought this would be the same duplicate parameter issue as bug 344856, but with this example snippet we are ending up with the following errors: 1. [Pb(526) Bound mismatch: The type AA is not a valid substitute for the bounded parameter <AA extends I1> of the type GenericClass<AA,BB> 2.Pb(526) Bound mismatch: The type BB is not a valid substitute for the bounded parameter <BB extends I2> of the type GenericClass<AA,BB>]
The patch for bug 341232 also fixes this bug, marking as a dupe *** This bug has been marked as a duplicate of bug 341232 ***