Added testcase for overlapping struct default initializer I has missed. Slight tweak of the relevant error message.

This commit is contained in:
Tomas Lindquist Olsen
2009-04-27 01:43:29 +02:00
parent 664c2c333e
commit 3bd5cf70c2
2 changed files with 9 additions and 1 deletions

View File

@@ -110,7 +110,7 @@ const llvm::Type* IrTypeStruct::buildType()
if (v_begin >= f_end || v_end <= f_begin)
continue;
sd->error(vd->loc, "overlapping initialization for %s and %s",
sd->error(vd->loc, "has overlapping initialization for %s and %s",
field_it->toChars(), vd->toChars());
}
}

View File

@@ -0,0 +1,8 @@
struct S
{
union
{
float f = 1;
int i = 2;
}
}