Relates :
|
If T is an identifier for a parameterized type, then using "instanceof T" obviously shouldn't be legal. The compiler does enforce this but the error message "unexpected type ... found T, required class or array" doesn't make it obvious that this is a deliberate restriction. -------------------------------- An example: class T4881267 { <T> void m(Object o) { boolean b = o instanceof T; } } ###@###.### 2004-09-17
|