Skip to content

Commit

Permalink
test with classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Moth-Tolias committed Jun 6, 2022
1 parent c1bc9cb commit 866d8f8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source/expected/expected.d
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,16 @@ if(is(FailureType == enum))

immutable Expected!(S, Failure) baz = Failure.Error1;
assert(baz.failure == Failure.Error1);

//and with classes!
class C
{
S field;
}

scope c = new C;
c.field = S(420);
Expected!(C, Failure) sus;
sus.result = c;
assert(sus.result.field == S(420));
}

0 comments on commit 866d8f8

Please sign in to comment.