Synchronized methods in D2
Jacob Carlborg
doob at me.com
Sat Sep 4 09:05:20 PDT 2010
I'm currently porting a D1 code base to D2 which has the following class
hierarchy:
interface Map
{
void clear ();
}
class Hashtable : Map
{
synchronized void clear () {};
}
class HashMap : Map
{
void clear () {};
}
When I compiler the code I get an error about the "clear" method in
Hashtable not being covariant with the "clear" method in Map. Any
suggestions how I could solve this, preferable working in D1 as well?
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list