1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

transformer: fix precalculations of simple expressions involving floating literals, with -prod (fix VSL tests with -prod)

This commit is contained in:
Delyan Angelov
2022-10-16 20:23:41 +03:00
parent d857e97d8c
commit 3d2e251bf2
3 changed files with 39 additions and 2 deletions

View File

@@ -866,8 +866,8 @@ pub fn (mut t Transformer) infix_expr(mut node ast.InfixExpr) ast.Expr {
ast.FloatLiteral {
match mut node.right {
ast.FloatLiteral {
left_val := node.left.val.f32()
right_val := node.right.val.f32()
left_val := node.left.val.f64()
right_val := node.right.val.f64()
match node.op {
.eq {
return ast.BoolLiteral{