Closed DenGhostYY closed 18 hours ago
For now we recommend to use an intermediate variable when passing array elements or instance variables by references.
var temp := a[i]
_Increment(@temp)
a[i] := temp
and
var temp := o:nNumber
_Increment(@temp)
o:nNumber := temp
We'll try to fix this in the compiler. but that is not trivial
Awesome. Thanks
Describe the bug Passing by reference does not work for array elements and object fields.
Example 1
Expected behavior (XBase++ exe) Output
Actual behavior (X# compiler)
Example 2
Expected behavior (XBase++ exe) Output
Actual behavior (X# exe) No compilation errors and warnings
Additional context X# Compiler version 2.20.0.3 (public) -dialect:xBase++ -codepage:866 -lb -enforceself -memvar -xpp1 -vo1 -vo3 -vo4 -vo5 -vo9 -vo10 -vo12 -vo13 -vo14 -vo15 -vo16 -vo17 -reference:XSharp.Core.dll -reference:XSharp.RT.dll -reference:XSharp.XPP.dll