Skip to content

Commit d976e82

Browse files
committed
Move unittest to correct position
1 parent 1214a69 commit d976e82

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

std/sumtype.d

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,13 @@ version (D_BetterC) {} else
15701570
enum result = test();
15711571
}
15721572

1573+
// https://github.com/dlang/phobos/issues/10563
1574+
// Do not waste space for tag if sumtype has only single type
1575+
unittest
1576+
{
1577+
static assert(SumType!int.sizeof == 4);
1578+
}
1579+
15731580
/// True if `T` is an instance of the `SumType` template, otherwise false.
15741581
private enum bool isSumTypeInstance(T) = is(T == SumType!Args, Args...);
15751582

@@ -2627,10 +2634,3 @@ private void destroyIfOwner(T)(ref T value)
26272634
destroy(value);
26282635
}
26292636
}
2630-
2631-
// https://github.com/dlang/phobos/issues/10563
2632-
// Do not waste space for tag if sumtype has only single type
2633-
unittest
2634-
{
2635-
static assert(SumType!int.sizeof == 4);
2636-
}

0 commit comments

Comments
 (0)