diff options
Diffstat (limited to 'testdata/scad/misc/value-reassignment-tests.scad')
-rw-r--r-- | testdata/scad/misc/value-reassignment-tests.scad | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/testdata/scad/misc/value-reassignment-tests.scad b/testdata/scad/misc/value-reassignment-tests.scad index 475f78f..26afa03 100644 --- a/testdata/scad/misc/value-reassignment-tests.scad +++ b/testdata/scad/misc/value-reassignment-tests.scad @@ -1,4 +1,9 @@ +// Test reassignment which depends on a previously assigned variable, +// as this could be messed up if order of assignment evaluation +// changes + myval = 2; i = 2; -myval = i * 2; -echo(myval); +myval = i * 2; // This is not (yet) allowed as it will be evaluates in place of the first assignment +echo(myval, i); // Should output undef, 2 + |