aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/text/encoding.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/data/text/encoding.lux')
-rw-r--r--stdlib/source/lux/data/text/encoding.lux17
1 files changed, 8 insertions, 9 deletions
diff --git a/stdlib/source/lux/data/text/encoding.lux b/stdlib/source/lux/data/text/encoding.lux
index e1066bbcd..2752903a7 100644
--- a/stdlib/source/lux/data/text/encoding.lux
+++ b/stdlib/source/lux/data/text/encoding.lux
@@ -171,15 +171,14 @@
(|>> :representation))
)
-(`` (for {(~~ (static @.old))
- (as-is (import: #long java/lang/String
- (new [(Array byte) java/lang/String])
- (getBytes [java/lang/String] (Array byte))))
-
- (~~ (static @.jvm))
- (as-is (import: #long java/lang/String
- (new [[byte] java/lang/String])
- (getBytes [java/lang/String] [byte])))}))
+(with-expansions [<for-jvm> (as-is (import: #long java/lang/String
+ (new [[byte] java/lang/String])
+ (getBytes [java/lang/String] [byte])))]
+ (`` (for {(~~ (static @.old))
+ (as-is <for-jvm>)
+
+ (~~ (static @.jvm))
+ (as-is <for-jvm>)})))
(def: #export (to-utf8 value)
(-> Text Binary)