mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-02 12:50:55 +00:00
evaluator: fix unary operators on floating point types always throwing a spurious error
This commit is contained in:
parent
a6f9a82e5e
commit
a343d5ee65
@ -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 -> {
|
||||
@ -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 -> {
|
||||
|
Loading…
Reference in New Issue
Block a user