-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use w/a for missing support of @PolymorphicSignature methods in Scala 3:
- Loading branch information
1 parent
c52b5a1
commit 09ed83c
Showing
2 changed files
with
21 additions
and
12 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...la-core/jvm/src/main/java/com/github/plokhotnyuk/jsoniter_scala/core/ByteArrayAsLong.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.github.plokhotnyuk.jsoniter_scala.core; | ||
|
||
import java.lang.invoke.MethodHandles; | ||
import java.lang.invoke.VarHandle; | ||
import java.nio.ByteOrder; | ||
|
||
class ByteArrayAsLong { // FIXME: Use Java wrapper as w/a for missing support of @PolymorphicSignature methods in Scala 3, see: https://github.com/lampepfl/dotty/issues/11332 | ||
private static final VarHandle VH_LONG = | ||
MethodHandles.byteArrayViewVarHandle(long[].class, ByteOrder.LITTLE_ENDIAN); | ||
|
||
static void set(byte[] buf, int pos, long value) { | ||
VH_LONG.set(buf, pos, value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters