From 7bd533e7e8982c72c981b308e265e63e53552f2c Mon Sep 17 00:00:00 2001 From: Florian Deljarry Date: Mon, 12 Aug 2019 16:22:11 -0400 Subject: [PATCH] abstract_compiler: Replace the use of `n_float` by the `value` Signed-off-by: Florian Deljarry --- src/compiler/abstract_compiler.nit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/abstract_compiler.nit b/src/compiler/abstract_compiler.nit index c74933c..3fc2f40 100644 --- a/src/compiler/abstract_compiler.nit +++ b/src/compiler/abstract_compiler.nit @@ -1776,10 +1776,10 @@ abstract class AbstractCompilerVisitor # Generate a float value # # FIXME pass a Float, not a string - fun float_instance(value: String): RuntimeVariable + fun float_instance(value: Float): RuntimeVariable do var t = mmodule.float_type - var res = new RuntimeVariable("{value}", t, t) + var res = new RuntimeVariable("{value.to_hexa_exponential_notation}", t, t) return res end @@ -3820,7 +3820,7 @@ redef class AIntegerExpr end redef class AFloatExpr - redef fun expr(v) do return v.float_instance("{self.n_float.text}") # FIXME use value, not n_float + redef fun expr(v) do return v.float_instance(self.value.as(Float)) end redef class ACharExpr -- 1.7.9.5