fix: Infinite loop when evaluating (()) (#1427)#1456
fix: Infinite loop when evaluating (()) (#1427)#1456Gavinok wants to merge 2 commits intocarp-lang:masterfrom
(()) (#1427)#1456Conversation
Evaluation of `(())` is treated as a malformed expression rather than causing an infinite loop
|
Thanks, this is super useful! 🎉 Can we add a test for this? I suggest we put one in |
|
No problem I am just happy to help. Should be good to go. Let me know if I missed anything |
|
Super! Maybe we should introduce a special error type to improve the error message—or maybe that would be overkill. What does everyone else think? |
|
Not exactly sure what a better fitting existing error message would look like. Could try something like the error message of used for applying non functions. That's just an idea for reusing an existing error. Don't have any clever unique ideas personally. |
|
Of the two, I personally prefer the non-function error message. But I’d wait for feedback from the others :) |
|
Very nice! I also prefer the non-function error. |
|
@hellerve is there anyone else we are waiting to hear from? |
|
No, I think we’re good to merge. @eriksvedang is the only one with those rights, though :) |
|
The test suite fails on this branch – does it help if you merge in latest |
|
This bug is not present with the new evaluator, closing. |
Evaluation of
(())is treated as a malformed expression rather than causing an infinite loop.