Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions std/variant.d
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,7 @@ public:
auto arr = get!(A[]);
foreach (ref e; arr)
{
if (dg(e)) return 1;
if (auto r = dg(e)) return r;
}
}
else static if (is(A == VariantN))
Expand All @@ -1219,7 +1219,7 @@ public:
// Variant when in fact they are only changing tmp.
auto tmp = this[i];
debug scope(exit) assert(tmp == this[i]);
if (dg(tmp)) return 1;
if (auto r = dg(tmp)) return r;
}
}
else
Expand Down
Loading