Skip to content

Commit

Permalink
sema: fix unary plus and unary minus operator eval
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Mar 10, 2024
1 parent 3bf48fc commit 4a16091
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions std/jule/sema/eval.jule
Original file line number Diff line number Diff line change
Expand Up @@ -3349,9 +3349,9 @@ impl UnaryEval {
| self.d.constant.is_f64():
self.d.constant.set_f64(-self.d.constant.read_f64())
| self.d.constant.is_i64():
self.d.constant.set_f64(-self.d.constant.as_f64())
self.d.constant.set_i64(-self.d.constant.read_i64())
| self.d.constant.is_u64():
self.d.constant.set_f64(-self.d.constant.as_f64())
self.d.constant.set_i64(-self.d.constant.as_i64())
}
}

Expand Down Expand Up @@ -3387,9 +3387,9 @@ impl UnaryEval {
| self.d.constant.is_f64():
self.d.constant.set_f64(+self.d.constant.read_f64())
| self.d.constant.is_i64():
self.d.constant.set_f64(+self.d.constant.as_f64())
self.d.constant.set_i64(+self.d.constant.read_i64())
| self.d.constant.is_u64():
self.d.constant.set_f64(+self.d.constant.as_f64())
self.d.constant.set_i64(+self.d.constant.as_i64())
}
}

Expand Down

0 comments on commit 4a16091

Please sign in to comment.