Bug 83215 - missing unchecked cast warning on array access
Summary: missing unchecked cast warning on array access
Status: RESOLVED DUPLICATE of bug 78591
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-19 13:16 EST by Adam Kiezun CLA
Modified: 2005-01-19 16:15 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2005-01-19 13:16:22 EST
3.1M4
package p;
class TestArray1<T1 extends Object> {
	public Object[] data= new Object[1];
	
	public T1 get0(){
		return (T1)data[0]; //expected warning here
	}
}
Comment 1 Adam Kiezun CLA 2005-01-19 13:16:50 EST
possibly dup of bug 78591
Comment 2 Olivier Thomann CLA 2005-01-19 16:15:43 EST
With HEAD contents, we return:
----------
1. WARNING in c:\tests_sources\X.java
 (at line 5)
	return (T1)data[0]; //expected warning here
	       ^^^^^^^^^^^
Type safety: The cast from Object to T1 is actually checking against the erased
type Object
----------
1 problem

*** This bug has been marked as a duplicate of 78591 ***