Fixed problem in AssignExp where the result value might be uninitialized. see mini/assign1.d

This commit is contained in:
Tomas Lindquist Olsen
2008-08-03 16:59:28 +02:00
parent 996c197aa8
commit b0a5f554d6
2 changed files with 27 additions and 7 deletions

17
tests/mini/assign1.d Normal file
View File

@@ -0,0 +1,17 @@
module mini.assign1;
extern(C) int printf(char*, ...);
struct X
{
int a;
alias a b;
}
void main()
{
X e = void;
e.a = e.b = 5;
printf("%d - %d\n", e.a, e.b);
assert(e.a == 5);
assert(e.a == e.b);
}