Skip to content

Commit

Permalink
Update isBasicType usage for Phobos PR 8838
Browse files Browse the repository at this point in the history
  • Loading branch information
pbackus authored and dlang-bot committed Nov 1, 2023
1 parent 2ea8838 commit 0d8d563
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/dub/recipe/packagerecipe.d
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,9 @@ private T clone(T)(ref const(T) val)
import std.traits : isSomeString, isDynamicArray, isAssociativeArray, isBasicType, ValueType;

static if (is(T == immutable)) return val;
else static if (isBasicType!T) return val;
else static if (isDynamicArray!T) {
else static if (isBasicType!T || is(T Base == enum) && isBasicType!Base) {
return val;
} else static if (isDynamicArray!T) {
alias V = typeof(T.init[0]);
static if (is(V == immutable)) return val;
else {
Expand Down

0 comments on commit 0d8d563

Please sign in to comment.