From 0d8d563bb70a181141fbfb6536c228c99e89b055 Mon Sep 17 00:00:00 2001 From: Paul Backus Date: Wed, 1 Nov 2023 16:30:55 -0400 Subject: [PATCH] Update isBasicType usage for Phobos PR 8838 https://github.com/dlang/phobos/pull/8838 --- source/dub/recipe/packagerecipe.d | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/dub/recipe/packagerecipe.d b/source/dub/recipe/packagerecipe.d index c8bb5ecc8..30445d1a6 100644 --- a/source/dub/recipe/packagerecipe.d +++ b/source/dub/recipe/packagerecipe.d @@ -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 {