diff options
Diffstat (limited to '')
-rw-r--r-- | lux-jvm/source/luxc/lang/translation/jvm/primitive.lux | 10 |
1 files changed, 6 insertions, 4 deletions
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)) |