digitalmars.D.learn - Synchronized methods in D2
- Jacob Carlborg <doob me.com> Sep 04 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
Sep 04 2010








Jacob Carlborg <doob me.com>