Fix recent isPointer changes to use is(T == U*, U) instead of is(T : U*, U)

The behaviors are different and the changes appear accidental rather
than deliberate. In at least one case the change would result in wrong
behavior:

https://github.com/dlang/phobos/pull/8635#issuecomment-1433898162

Affected PRs: #8635, #8636, #8637, #8638, #8639
This commit is contained in:
Nathan Sashihara 2023-02-16 19:15:05 -05:00
parent 3acf18c099
commit 68c7ec8d25
5 changed files with 9 additions and 24 deletions

View file

@ -170,7 +170,7 @@ if (isIterable!Range && !isAutodecodableString!Range && !isInfinite!Range)
/// ditto
ForeachType!(typeof((*Range).init))[] array(Range)(Range r)
if (is(Range : U*, U) && isIterable!U && !isAutodecodableString!Range && !isInfinite!Range)
if (is(Range == U*, U) && isIterable!U && !isAutodecodableString!Range && !isInfinite!Range)
{
return array(*r);
}