Andrei Alexandrescu wrote:
Should that be a compile-time error? I think so.

=================================
class A : Exception
{
    this(string msg) { super(msg); }
}

void foo()
{
    try { }
    catch (Exception e) { }
    catch (A e) { }
}
=================================

gives:

test.d(9): Error: catch at test.d(10) hides catch at test.d(11)

Reply via email to