Skip to content

Commit

Permalink
unittest for variant bug 16383
Browse files Browse the repository at this point in the history
  • Loading branch information
Cauterite committed Aug 15, 2016
1 parent 90e7fd0 commit a63348d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions std/variant.d
Expand Up @@ -2293,6 +2293,18 @@ unittest
assert(depth(fb) == 3);
}

unittest
{
// https://issues.dlang.org/show_bug.cgi?id=16383
class Foo {this() immutable {}};
alias V = Algebraic!(immutable Foo);

auto x = V(new immutable Foo).visit!(
(immutable(Foo) _) => 3
);
assert(x == 3);
}

unittest
{
// http://d.puremagic.com/issues/show_bug.cgi?id=5310
Expand Down

0 comments on commit a63348d

Please sign in to comment.