Skip to main content

Generics: Stange error

1 reply [Last post]
acartapanis
Offline
Joined: 2005-05-09

Hi
I have a strange error using the generics. I define the two method:

public void unregisterServices(Collection _references);
public void unregisterServices(Collection _ids);

And i have an error, that the two fonctions has the same erasure. I can undestand why (because both parameters are Collection), but i think it is REALLY strange. If it is normal (not a bug), then generics are really less rich than what i think...
If anybody can help me to understand or to resolve this problem, send me a mail...

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexlamsl
Offline
Joined: 2004-09-02

Generics in Tiger is provided through type erasure, hence all the generic types would be removed during the compilation, i.e. the run-time class files would not contain any generic type information.