Closed EricB85 closed 4 years ago
How "NOT" is defined in the evaluation context? You should be able to call a delegate multiple times.
Standard built-in boolean negation is "!" operator.
Sorry you are right, I did a lot of experiments and misinterpreted an error. My message is valable for this type of syntax :
NOT(1==1)
I played with your unit tests so the NOT is varContext["NOT"] = (Func<bool, bool>)((t) => !t);
NOT(NOT(true))
works as expected, however something is definitely wrong when argument of a function is a result of comparison.
Let me check what is wrong here.
Bugfix is shipped in 1.0.12
It's now perfect :) Thank you.
I just discovred your library and its awesome. I am just wondering if it would be possible to do this kind of operations :
NOT(NOT(true))
orNOT(1==1)
I tried it and obtained this exception :System.InvalidOperationException: 'An expression of type 'System.Boolean' cannot be used to initialize an array of type 'System.Object''
The idea behind those simple exemples is to allow the possibility to chain operations.
Regards,
Eric