[OpenSCAD] each - Assertion failed on flat list

Torsten Paul Torsten.Paul at gmx.de
Sun Apr 29 08:10:52 EDT 2018


Yes, that's what I was thinking too.

Test cases:
https://github.com/openscad/openscad/blob/a9a4ab2dba80bedddbbe4b6ae84238bce5913d89/testdata/scad/bugs/issue1851-each-fail-on-scalar.scad

echo([each for(i=1) i]);
echo([each for(i=[1,2]) i]);
echo([each for(i=[1,2,[3,4]]) i]);
echo([each for(i=[1,2,[3,4,[5,6]]]) i]);
echo([each each for(i=[1,2,[3,4,[5,6]]]) i]);
echo([each each for(i=[1,2,[3,4,[5,6,[7,8]]]]) i]);
echo([each each each for(i=[1,2,[3,4,[5,6,[7,8]]]]) i]);

Output:
https://github.com/openscad/openscad/blob/a9a4ab2dba80bedddbbe4b6ae84238bce5913d89/tests/regression/echotest/issue1851-each-fail-on-scalar-expected.echo

ECHO: [1]
ECHO: [1, 2]
ECHO: [1, 2, 3, 4]
ECHO: [1, 2, 3, 4, [5, 6]]
ECHO: [1, 2, 3, 4, 5, 6]
ECHO: [1, 2, 3, 4, 5, 6, [7, 8]]
ECHO: [1, 2, 3, 4, 5, 6, 7, 8]


Any other cases I may have missed?

ciao,
   Torsten.



More information about the Discuss mailing list