diff --git a/source/dub/description.d b/source/dub/description.d index 2bb6b97..0e4c955 100644 --- a/source/dub/description.d +++ b/source/dub/description.d @@ -43,7 +43,12 @@ { foreach (ref p; packages) if (p.name == name) - return p; + { + static if (__VERSION__ > 2065) + return p; + else + return *cast(inout(PackageDescription)*)&p; + } throw new Exception("Package '"~name~"' not found in dependency tree."); }