Skip to content

Commit 8e8c883

Browse files
committed
rework Annotated
1 parent 473f20e commit 8e8c883

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/mir/annotated.d

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ version (D_Exceptions)
1414
static immutable exc = new Exception(excMsg);
1515

1616
/++
17-
A convenience difinition of an annotated value.
17+
A convenience difinition of an annotated value.
18+
19+
A structure that behaves like a recursive algebraic type should define `enum _serdeRecursiveAlgebraic;` member.
1820
+/
1921
@serdeRegister
2022
@serdeAnnotation
@@ -26,7 +28,7 @@ struct Annotated(T) {
2628
static if (!(is(T == union) || is(T == struct)))
2729
private enum _alloc_ = false;
2830
else
29-
static if (serdeIsDynamicAlgebraic!T)
31+
static if (__traits(hasMember, T, "_serdeRecursiveAlgebraic"))
3032
private enum _alloc_ = true;
3133
else
3234
{

0 commit comments

Comments
 (0)