mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-22 07:43:18 +01:00
Added testcase for overlapping struct default initializer I has missed. Slight tweak of the relevant error message.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
8
tests/mini/nocompile_initoverlap2.d
Normal file
8
tests/mini/nocompile_initoverlap2.d
Normal file
@@ -0,0 +1,8 @@
|
||||
struct S
|
||||
{
|
||||
union
|
||||
{
|
||||
float f = 1;
|
||||
int i = 2;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user