Skip to content

Commit

Permalink
Merge pull request #61 from BorisCarvajal/fix_isSame21889
Browse files Browse the repository at this point in the history
Fix erroneous __traits(isSame) comparison
  • Loading branch information
atilaneves authored May 5, 2021
2 parents 7e0aa92 + b12fa8c commit adb6735
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/automem/utils.d
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ void destruct(T)(T obj) if (is(T == interface)) {
}

void destruct(T)(ref T obj) if (is(T == struct)) {
static if (__traits(hasMember, T, "__xdtor") &&
__traits(isSame, T, __traits(parent, obj.__xdtor)))
static if (__traits(hasMember, T, "__xdtor"))
obj.__xdtor;
}

Expand Down

0 comments on commit adb6735

Please sign in to comment.