D1: Error: duplicate union initialization for size

jicman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Aug 27 14:48:39 PDT 2014


On Wednesday, 27 August 2014 at 06:20:24 UTC, Jacob Carlborg
wrote:
> On 23/08/14 19:50, jicman wrote:
>
>> This is line 7634:
>>
>> const Size DEFAULT_SCALE = { 5, 13 };
>>
>> What does the error say and how can I fix it?  Thanks.
>
> Does the following make any difference?
>
> const Size DEFAULT_SCAL = Size(5, 13)

I changed it from this,

const Size DEFAULT_SCALE = { 5, 13 };

to this,

const Size DEFAULT_SCALE = Size(5,13);

and now I am getting 4 errors: :-)

build -I..;c:\D\import -version=gui -version=Phobos -g
OpenProjs.res  OpenProjs.d
c:\D\import\dfl\control.d(7635): Error: duplicate union
initialization for size
c:\D\import\dfl\control.d(7954): Error: duplicate union
initialization for size
c:\D\import\dfl\control.d(7954): Error: duplicate union
initialization for size
c:\D\import\dfl\control.d(7954): Error: duplicate union
initialization for size

Line 7635:
const Size DEFAULT_SCALE = Size(5,13);

Line 7954:
Size autossz = DEFAULT_SCALE;

But, look at line 7955:

Size scrollsz = { 0, 0 };

And there is no error for that line.  Changing the 5 and 13 for
0, 0, has now taken that error out, but what does that mean?
What if I needed that 5 and 13 there?



More information about the Digitalmars-d-learn mailing list