Closed lucianbc closed 7 months ago
Hi!
It's unfortunately not possible to override parentheses behavior in Kotlin, but that's okay, you only need to prefix them with p
so it becomes a function call, which will carry the parentheses over into the arithmetic expression.
that's a nice solution. I missed that utility. Thanks!
Hi! Very good job for developing this. I like the operator overloading feature, but I found a problem where expressions have parenthesis. The following snippet
generates
while it was expected to generate
The first one, without parenthesis, is not evaluated correctly. This happens with all of the other operators. One solution would be to add parenthesis for all operator arguments. I don't know if it is possible to overload the
()
operator (not invoke).