Skip to content

Commit

Permalink
fix static if mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
wilzbach committed May 7, 2016
1 parent 286e709 commit 69a3d9e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions std/traits.d
Original file line number Diff line number Diff line change
Expand Up @@ -4253,15 +4253,18 @@ package template isBlitAssignable(T)
static if (i == 0)
{
}
else if (T.tupleof[i].offsetof == offset)
{
if (assignable)
continue;
}
else
{
if (!assignable)
return false;
if (T.tupleof[i].offsetof == offset)
{
if (assignable)
continue;
}
else
{
if (!assignable)
return false;
}
}
assignable = isBlitAssignable!(typeof(T.tupleof[i]));
offset = T.tupleof[i].offsetof;
Expand Down
2 changes: 1 addition & 1 deletion std/variant.d
Original file line number Diff line number Diff line change
Expand Up @@ -2195,7 +2195,7 @@ private auto visitImpl(bool Strict, VariantType, Handler...)(VariantType variant
result.exceptionFuncIdx = dgidx;
}
}
else if (is(Unqual!(Params[0]) == T))
else static if (is(Unqual!(Params[0]) == T))
{
if (added)
assert(false, "duplicate overload specified for type '" ~ T.stringof ~ "'");
Expand Down

0 comments on commit 69a3d9e

Please sign in to comment.