aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/text/encoding.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-05-28 22:14:53 -0400
committerEduardo Julian2019-05-28 22:14:53 -0400
commit8cd61c00de00728759d0362a60dbca8d23e4d8dc (patch)
tree4eaf5b75bea6bd84b1db28eb405539213392a588 /stdlib/source/lux/data/text/encoding.lux
parentf55e513690400cce9e5e17a01a98922d91e086c3 (diff)
Both the old JVM interop and the new JVM interop use the same syntax for array types.
Diffstat (limited to '')
-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)