xsharp.eu • XS0102 error: The type 'XXXX' already contains a definition for 'YYYY'
Page 1 of 1

XS0102 error: The type 'XXXX' already contains a definition for 'YYYY'

Posted: Sun Jan 09, 2022 7:44 pm
by alex_schmitt
Hi all,

after using VoXPorter I get tons of errors "XS0102: The type 'XXXX' already contains a definition for 'YYYY'"

Interestingly enough, I did not find any resolution in the documents nor in the forum.

I have a lot of PROTECT variables in my classes that I access and assign as follows:

Code: Select all

CLASS A
PROTECT VarA

ACCESS VarA
return self:VarA

Assign VarA(value)
self:VarA:=value

Of course I can refactor and create getters and setters as follows:

Code: Select all


ACCESS getVarA
return self:VarA

Assign setVarA(value)
self:VarA:=value
But before I do that I wanted to double check that this is the only option as this is pretty error-prone and exhausting when I am doing that in VO.

Any thoughts would be helpful :)

Best,
Alex

XS0102 error: The type 'XXXX' already contains a definition for 'YYYY'

Posted: Sun Jan 09, 2022 7:49 pm
by robert
Alex,
From which version of VO are you coming.
VO 2.8 should have already warned you for that.
There is an option in the VOXPorter to detect this. This option will prefix the protected variable with an underscore IIRC.

Robert

XS0102 error: The type 'XXXX' already contains a definition for 'YYYY'

Posted: Sun Jan 09, 2022 8:23 pm
by alex_schmitt
Hi Robert,

wow the speed you guys are responding is truely amazing.

Yes, the "CheckForIVarAndPropertyConflicts" flag did the trick! I am using 2.8 SP4 Build 2838. I assume there was a warning but I did not take it serious.

Best,
Alex