Created
July 19, 2015 20:44
-
-
Save dnadlinger/90ab58e2c473d52b91b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint count; | |
struct S { | |
uint x; | |
void opAssign(const ref S rhs) { assert(false); } | |
~this() { ++count; } | |
} | |
void main() { | |
S[2] a; | |
a[0].x = 42; | |
a = a.init; | |
assert(a[0].x == 0); // as expected the value has been reset | |
assert(count == 0); // Passes?!? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment