Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349524 - expressions watch not working in debug mode for static generic method and static generic class with same type name
Summary: expressions watch not working in debug mode for static generic method and sta...
Status: CLOSED DUPLICATE of bug 344856
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-16 03:39 EDT by jason CLA
Modified: 2011-08-22 13:15 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jason CLA 2011-06-16 03:39:10 EDT
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".
Comment 1 Michael Rennie CLA 2011-08-22 13:15:52 EDT
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 ***