Duet3D / RepRapFirmware

OO C++ RepRap Firmware
GNU General Public License v3.0
939 stars 532 forks source link

Incorrect processing of # operator when operand is an element of an array of arrays #1020

Closed dc42 closed 2 months ago

dc42 commented 2 months ago

Forum thread https://forum.duet3d.com/topic/36017/unexpected-error-with-and-ternary-operator.

Given this macro:

var A = {{1,2}, {3,4}}
echo #var.A[0]
echo #(var.A[0])

the first echo command outputs {1,2} which is incorrect. The second one outputs 2 which is correct. Verified using 3.6.0-alpha.1 in standalone mode.

dc42 commented 2 months ago

Fixed in 3.6-dev

dc42 commented 2 months ago

Back-ported to 3.5-dev.