From abe24425ced15fd784ef6c62d6f186af72b491db Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 11 Jul 2021 01:51:04 -0400 Subject: Re-named ":coerce" to ":as" since it technically doesn't do coercions. --- lux-jvm/source/luxc/lang/translation/jvm/primitive.lux | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lux-jvm/source/luxc/lang/translation') diff --git a/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux b/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux index 3383e3856..5f3a98b0f 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux @@ -98,12 +98,14 @@ [+5.0 _.ICONST_5]) _ - (let [constantI (if (i.= ..d0-bits - (java/lang/Double::doubleToRawLongBits (:coerce java/lang/Double value))) + (let [constantI (if (|> value + (:as java/lang/Double) + java/lang/Double::doubleToRawLongBits + (i.= ..d0-bits)) _.DCONST_0 (_.double value))] (operation@wrap (|>> constantI (_.wrap type.double)))))) -(def: #export (text value) +(def: #export text (-> Text (Operation Inst)) - (operation@wrap (_.string value))) + (|>> _.string operation@wrap)) -- cgit v1.2.3