| Summary: | expressions watch not working in debug mode for static generic method and static generic class with same type name | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | jason <ljshan> |
| Component: | Debug | Assignee: | Platform-Debug-Inbox <platform-debug-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Michael_Rennie |
| Version: | 4.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
The underlying problem is the same as bug 344856 - we are ending up with a duplicate variable: 1. Pb(520) Duplicate type parameter E *** This bug has been marked as a duplicate of bug 344856 *** |
Build Identifier: 20110218-0911 When I debug a java class with one static generic method(with type name E) and one static generic class(with type name E), the instance variable "this" or other instance variables can not display value in the "Expressions" window. The error message is: "error(s)_during_the_evaluation", the given reason is: "Evaluations must contain either an expression or a block of well-formed statements". However, this problem disappears when I choose different names for generic types. (for example, in the following steps, I choose E for staticMethod, choose T for static class StaticClass, the problem doesn't occur any more.) This bug report may relate to #344856 and #161364. Reproducible: Always Steps to Reproduce: To repeat the error, first write a java class like this: 1. a java class that causes the problem: public class Test { public static <E extends Comparable<E>> void staticMethod( ){ } public static class StaticClass<E extends Comparable<E>>{ } public void instanceMethod(){ System.out.println( ); } public static void main(String[] args){ Test t = new Test(); t.instanceMethod(); } } 2. then set a breakpoint at the statement "System.out.println( );" in the instance method "instanceMethod". When the program runs to this breakpoint, click the "Expressions" window and add the variable "this".