Skip to content

Commit

Permalink
fix issue #38
Browse files Browse the repository at this point in the history
  • Loading branch information
9il committed Jan 15, 2021
1 parent 974d1b9 commit 4a47876
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions source/mir/algebraic.d
Original file line number Diff line number Diff line change
Expand Up @@ -2870,3 +2870,13 @@ version(mir_core_test) unittest
}

private enum isSimpleAggregateType(T) = is(T == class) || is(T == struct) || is(T == union) || is(T == interface);

unittest
{
static struct Test
{
alias Value = void;
}

alias B = Nullable!Test;
}
2 changes: 1 addition & 1 deletion source/mir/internal/meta.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ template memberTypeOf(T, string member)

template isMemberType(T, string member)
{
enum isMemberType = is(typeof((ref __traits(getMember, T, member) v){}));
enum isMemberType = is(typeof((ref __traits(getMember, T, member) v){})) || is(__traits(getMember, T, member) : void);
}

template isSingleMember(T, string member)
Expand Down

0 comments on commit 4a47876

Please sign in to comment.