diff --git a/source/dub/dependency.d b/source/dub/dependency.d index f41c458..52dc3ee 100644 --- a/source/dub/dependency.d +++ b/source/dub/dependency.d @@ -776,7 +776,7 @@ */ @property string remote() @nogc nothrow pure @safe in { assert(m_remote !is null); } - body + do { return m_remote; } diff --git a/source/dub/internal/undead/xml.d b/source/dub/internal/undead/xml.d index 368aed5..4c11a47 100644 --- a/source/dub/internal/undead/xml.d +++ b/source/dub/internal/undead/xml.d @@ -591,7 +591,7 @@ */ override bool opEquals(scope const Object o) const { - const doc = toType!(const Document)(o); + const scope doc = toType!(const Document)(o); return prolog == doc.prolog && (cast(const) this).Element.opEquals(cast(const) doc) && epilog == doc.epilog; @@ -611,7 +611,7 @@ */ override int opCmp(scope const Object o) scope const { - const doc = toType!(const Document)(o); + const scope doc = toType!(const Document)(o); if (prolog != doc.prolog) return prolog < doc.prolog ? -1 : 1; if (int cmp = this.Element.opCmp(doc)) @@ -842,7 +842,7 @@ */ override bool opEquals(scope const Object o) const { - const element = toType!(const Element)(o); + const scope element = toType!(const Element)(o); immutable len = items.length; if (len != element.items.length) return false; foreach (i; 0 .. len) @@ -866,7 +866,7 @@ */ override int opCmp(scope const Object o) @safe const { - const element = toType!(const Element)(o); + const scope element = toType!(const Element)(o); for (uint i=0; ; ++i) { if (i == items.length && i == element.items.length) return 0; @@ -1277,7 +1277,7 @@ */ override bool opEquals(scope const Object o) const { - const item = toType!(const Item)(o); + const scope item = toType!(const Item)(o); const t = cast(const Comment) item; return t !is null && content == t.content; } @@ -1296,7 +1296,7 @@ */ override int opCmp(scope const Object o) scope const { - const item = toType!(const Item)(o); + const scope item = toType!(const Item)(o); const t = cast(const Comment) item; return t !is null && (content != t.content ? (content < t.content ? -1 : 1 ) : 0 ); @@ -1365,7 +1365,7 @@ */ override bool opEquals(scope const Object o) const { - const item = toType!(const Item)(o); + const scope item = toType!(const Item)(o); const t = cast(const CData) item; return t !is null && content == t.content; } @@ -1384,7 +1384,7 @@ */ override int opCmp(scope const Object o) scope const { - const item = toType!(const Item)(o); + const scope item = toType!(const Item)(o); const t = cast(const CData) item; return t !is null && (content != t.content ? (content < t.content ? -1 : 1 ) : 0 ); @@ -1442,7 +1442,7 @@ */ override bool opEquals(scope const Object o) const { - const item = toType!(const Item)(o); + const scope item = toType!(const Item)(o); const t = cast(const Text) item; return t !is null && content == t.content; } @@ -1461,7 +1461,7 @@ */ override int opCmp(scope const Object o) scope const { - const item = toType!(const Item)(o); + const scope item = toType!(const Item)(o); const t = cast(const Text) item; return t !is null && (content != t.content ? (content < t.content ? -1 : 1 ) : 0 ); @@ -1525,7 +1525,7 @@ */ override bool opEquals(scope const Object o) const { - const item = toType!(const Item)(o); + const scope item = toType!(const Item)(o); const t = cast(const XMLInstruction) item; return t !is null && content == t.content; } @@ -1544,7 +1544,7 @@ */ override int opCmp(scope const Object o) scope const { - const item = toType!(const Item)(o); + const scope item = toType!(const Item)(o); const t = cast(const XMLInstruction) item; return t !is null && (content != t.content ? (content < t.content ? -1 : 1 ) : 0 ); @@ -1605,7 +1605,7 @@ */ override bool opEquals(scope const Object o) const { - const item = toType!(const Item)(o); + const scope item = toType!(const Item)(o); const t = cast(const ProcessingInstruction) item; return t !is null && content == t.content; } @@ -1624,7 +1624,7 @@ */ override int opCmp(scope const Object o) scope const { - const item = toType!(const Item)(o); + const scope item = toType!(const Item)(o); const t = cast(const ProcessingInstruction) item; return t !is null && (content != t.content ? (content < t.content ? -1 : 1 ) : 0 ); @@ -2955,7 +2955,7 @@ private { - inout(T) toType(T)(inout Object o) + inout(T) toType(T)(scope return inout Object o) { T t = cast(T)(o); if (t is null) diff --git a/source/dub/packagemanager.d b/source/dub/packagemanager.d index be15f15..cb637bd 100644 --- a/source/dub/packagemanager.d +++ b/source/dub/packagemanager.d @@ -272,7 +272,7 @@ */ Package loadSCMPackage(string name, Dependency dependency) in { assert(!dependency.repository.empty); } - body { + do { Package pack; with (dependency.repository) final switch (kind) diff --git a/source/dub/semver.d b/source/dub/semver.d index 68978d8..c04a9c5 100644 --- a/source/dub/semver.d +++ b/source/dub/semver.d @@ -103,7 +103,7 @@ */ bool isPreReleaseVersion(string ver) pure @nogc in { assert(isValidVersion(ver)); } -body { +do { foreach (i; 0 .. 2) { auto di = ver.indexOf('.'); assert(di > 0);