Closed jrfondren closed 10 months ago
Thanks for reporting this, this was a regression I made while doing a refactor a while ago. Fixed in https://github.com/edubart/nelua-lang/commit/20d784a00e389e3d26f75f1142214048b42efe32
Be careful when using and
+ or
as a ternary operator, because it's not really a ternary operator.
Bug description
I noticed that niltype is falsy, which I didn't expect (although it having 'nil' in the name is a hint), and found this while demonstrating falsy values.
Code example
Environment
x86_64 linux Nelua 0.2.0-dev Build number: 1588 Git date: 2023-09-16 16:20:44 -0300 Git hash: 596fcca5c77932da8a07c249de59a9dff3099495 Semantic version: 0.2.0-dev.1588+596fcca5 Copyright (C) 2019-2022 Eduardo Bart (https://nelua.io/)