Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
fix catching derived exceptions across dll boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Colvin authored and adamdruppe committed Dec 21, 2019
1 parent c6aceec commit a0c51af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rt/cast_.d
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ int _d_isbaseof2(ClassInfo oc, ClassInfo c, ref size_t offset)

int _d_isbaseof(ClassInfo oc, ClassInfo c)
{
if (oc is c)
if (oc.compareClassInfo(c))
return true;

do
{
if (oc.base is c)
if (oc.base.compareClassInfo(c))
return true;

foreach (iface; oc.interfaces)
{
if (iface.classinfo is c || _d_isbaseof(iface.classinfo, c))
if (iface.classinfo.compareClassInfo(c) || _d_isbaseof(iface.classinfo, c))
return true;
}

Expand Down

0 comments on commit a0c51af

Please sign in to comment.