Skip to content

Commit

Permalink
evaluator: fix unary operators on floating point types always throwin…
Browse files Browse the repository at this point in the history
…g a spurious error (#9)
  • Loading branch information
ScrelliCopter authored Sep 12, 2023
1 parent a6f9a82 commit b42ca92
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class EvaluationVisitor(root: Scope) : NodeVisitor<Any> {
convert = { it.toDouble() },
plus = { +it },
minus = { -it },
binaryNot = unaryFloatingPointTypeError("binary not")
binaryNot = { unaryFloatingPointTypeError("binary not") }
)
}
is Float -> {
Expand All @@ -127,7 +127,7 @@ class EvaluationVisitor(root: Scope) : NodeVisitor<Any> {
convert = { it.toFloat() },
plus = { +it },
minus = { -it },
binaryNot = unaryFloatingPointTypeError("binary not")
binaryNot = { unaryFloatingPointTypeError("binary not") }
)
}
is Long -> {
Expand Down

0 comments on commit b42ca92

Please sign in to comment.