diff options
author | Eduardo Julian | 2019-05-17 00:44:29 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-05-17 00:44:29 -0400 |
commit | d770066b9e2046ea172305dc08f271e1159f7b64 (patch) | |
tree | 1ae9b0e46ca0c53d1a4d660c106ac0eb8fc7dcf5 /stdlib/source/lux/data/text/encoding.lux | |
parent | 9b59f66c8d8115a67d6eee1e7a38aa39823db222 (diff) |
Automatic type casting/coercion for Boolean/Bit and String/Text.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/text/encoding.lux | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/source/lux/data/text/encoding.lux b/stdlib/source/lux/data/text/encoding.lux index 470265081..1ce536436 100644 --- a/stdlib/source/lux/data/text/encoding.lux +++ b/stdlib/source/lux/data/text/encoding.lux @@ -178,16 +178,16 @@ (~~ (static @.jvm)) (as-is (import: #long java/lang/String - (new [(Array byte) java/lang/String]) - (getBytes [java/lang/String] (Array byte))))})) + (new [[byte] java/lang/String]) + (getBytes [java/lang/String] [byte])))})) (def: #export (to-utf8 value) (-> Text Binary) (`` (for {(~~ (static @.old)) - (java/lang/String::getBytes (..name ..utf-8) (:coerce java/lang/String value)) + (java/lang/String::getBytes (..name ..utf-8) value) (~~ (static @.jvm)) - (java/lang/String::getBytes (..name ..utf-8) (:coerce java/lang/String value))}))) + (java/lang/String::getBytes (..name ..utf-8) value)}))) (def: #export (from-utf8 value) (-> Binary (Error Text)) |