Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
phearnot committed Jun 26, 2024
1 parent fcb9215 commit 6de6c64
Show file tree
Hide file tree
Showing 98 changed files with 503 additions and 497 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import java.nio.charset.StandardCharsets

import com.wavesplatform.common.state.ByteStr
import com.wavesplatform.lang.v1.traits.DataType
import scodec.Codec
import scodec.{Codec, ValueCodecEnrichedWithHListSupport, HListCodecEnrichedWithHListSupport, TransformSyntax}
import scodec.bits.*
import scodec.codecs.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class BigIntOpsSt {
val maxSqrt = CONST_BIGINT(BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819968"))
val three = CONST_BIGINT(3)
val two = CONST_BIGINT(2)
val list = ARR((PureContext.BigIntMin to PureContext.BigIntMin + PureContext.MaxListLengthV4 - 1).map(CONST_BIGINT), limited = true).explicitGet()
val list = ARR((PureContext.BigIntMin to PureContext.BigIntMin + PureContext.MaxListLengthV4 - 1).map(CONST_BIGINT.apply), limited = true).explicitGet()
val listReversed = ARR(list.xs.reverse, limited = true).explicitGet()
val maxBytes = PureContext.BigIntMax.toByteArray

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import org.openjdk.jmh.infra.Blackhole
class CompilerBenchmark {

@Benchmark
def serialize_test(st: St, bh: Blackhole): Unit = bh.consume(ScriptCompiler(st.scriptString, isAssetScript = false, ScriptEstimatorV2).explicitGet()._1)
def serialize_test(st: St, bh: Blackhole): Unit = bh.consume(ScriptCompiler.compile(st.scriptString, ScriptEstimatorV2).explicitGet()._1)
}

object CompilerBenchmark {
Expand Down
7 changes: 4 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ lazy val `waves-node` = (project in file("."))

inScope(Global)(
Seq(
scalaVersion := "2.13.12",
scalaVersion := "2.13.14",
organization := "com.wavesplatform",
organizationName := "Waves Platform",
organizationHomepage := Some(url("https://wavesplatform.com")),
Expand All @@ -150,7 +150,8 @@ inScope(Global)(
"-Xlint",
"-Wconf:cat=deprecation&site=com.wavesplatform.api.grpc.*:s", // Ignore gRPC warnings
"-Wconf:cat=deprecation&site=com.wavesplatform.protobuf.transaction.InvokeScriptResult.*:s", // Ignore deprecated argsBytes
"-Wconf:cat=deprecation&site=com.wavesplatform.state.InvokeScriptResult.*:s"
"-Wconf:cat=deprecation&site=com.wavesplatform.state.InvokeScriptResult.*:s",
"-Wconf:cat=deprecation&site=com\\.wavesplatform\\.(lang\\..*|JsApiUtils)&origin=com\\.wavesplatform\\.lang\\.v1\\.compiler\\.Terms\\.LET_BLOCK:s"
),
crossPaths := false,
cancelable := true,
Expand Down Expand Up @@ -216,7 +217,7 @@ checkPRRaw := Def
(`repl-jvm` / Test / test).value
(`lang-js` / Compile / fastOptJS).value
(`lang-tests-js` / Test / test).value
// (`grpc-server` / Test / test).value
(`grpc-server` / Test / test).value
(node / Test / test).value
(`repl-js` / Compile / fastOptJS).value
(`node-it` / Test / compile).value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ package object events {
implicit class BlockchainUpdatedExt(val se: PBBlockchainUpdated) extends Matchers {
def append(implicit pos: Position): Append =
se.update match {
case Update.Append(a) => a
case other => fail(s"${other.getClass.getSimpleName} is not an Append")
case Update.Append(append) => append
case other => fail(s"${other.getClass.getSimpleName} is not an Append")
}
}

Expand Down
2 changes: 2 additions & 0 deletions lang/js/src/main/scala/com/wavesplatform/JsApiUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.wavesplatform.lang.v1.compiler.{CompilationError, CompilerContext}
import com.wavesplatform.lang.v1.parser.Expressions
import com.wavesplatform.lang.v1.parser.Expressions.{PART, Type}

import scala.annotation.nowarn
import scala.scalajs.js
import scala.scalajs.js.Any
import scala.scalajs.js.Dynamic.literal as jObj
Expand Down Expand Up @@ -244,6 +245,7 @@ object JsApiUtils {
jObj("posStart" -> err.start, "posEnd" -> err.end, "msg" -> err.message)
}

@nowarn("cat=deprecation")
def toJs(ast: EXPR): js.Object = {
def r(expr: EXPR): js.Object = {
expr match {
Expand Down
2 changes: 1 addition & 1 deletion lang/js/src/main/scala/com/wavesplatform/lang/Global.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.wavesplatform.lang.v1.evaluator.ctx.impl.crypto.RSA.DigestAlgorithm
import java.math.{BigInteger, BigDecimal as BD}
import scala.collection.mutable
import scala.scalajs.js.JSConverters.*
import scala.scalajs.js.typedarray.{ArrayBuffer, Int8Array}
import scala.scalajs.js.typedarray.{ArrayBuffer, Int8Array, TA2AB}
import scala.util.Try

object Global extends BaseGlobal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ case class ListTypeMapper(bitMapper: TypeBitMapper) extends TypeBitMapper {

override def fromIndex(i: Int): Either[String, FINAL] =
if ((i >> bitMapper.length) % 2 == 1)
bitMapper.fromIndex(i ^ (1 << bitMapper.length)).map(LIST)
bitMapper.fromIndex(i ^ (1 << bitMapper.length)).map(LIST.apply)
else
bitMapper.fromIndex(i)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ object ScriptReader {
s <- ContractScript(stdLibVersion, dapp)
} yield s
}).left
.map(ScriptParseError)
.map(ScriptParseError.apply)
} yield s
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ trait BaseGlobal {
}

def dAppFuncTypes(dApp: DApp): Either[ScriptParseError, FunctionSignatures] =
MetaMapper.dicFromProto(dApp).bimap(ScriptParseError, combineMetaWithDApp(_, dApp))
MetaMapper.dicFromProto(dApp).bimap(ScriptParseError.apply, combineMetaWithDApp(_, dApp))

private def combineMetaWithDApp(meta: ParsedMeta, dApp: DApp): FunctionSignatures = {
val argTypesWithFuncName =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ object Decompiler {
.flatMap(m =>
(m.group(1), m.group(2)) match {
case ("User", name) => Some(User(name))
case ("Native", id) => Try(id.toShort).toOption.map(Native)
case ("Native", id) => Try(id.toShort).toOption.map(Native.apply)
case _ => None
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class ExpressionCompiler(val version: StdLibVersion) {

private def findGenericType(p: Pos, t: String): Either[CompilationError, FINAL => FINAL] =
t match {
case Type.ListTypeName => Right(LIST)
case Type.ListTypeName => Right(LIST.apply)
case _ => Left(GenericTypeNotFound(p.start, p.end, t))
}

Expand Down Expand Up @@ -789,9 +789,9 @@ class ExpressionCompiler(val version: StdLibVersion) {
.collect {
case Expressions.Single(t, None) =>
Expressions.FUNCTION_CALL(pos, PART.VALID(pos, IsInstanceOf), List(v, Expressions.CONST_STRING(pos, t)))
case Expressions.Single(PART.VALID(pos, Type.ListTypeName), Some(PART.VALID(_, Expressions.AnyType(_)))) =>
case Expressions.Single(PART.VALID(vpos, Type.ListTypeName), Some(PART.VALID(_, Expressions.AnyType(_)))) =>
val t = PART.VALID(pos, "List[Any]")
Expressions.FUNCTION_CALL(pos, PART.VALID(pos, IsInstanceOf), List(v, Expressions.CONST_STRING(pos, t)))
Expressions.FUNCTION_CALL(vpos, PART.VALID(vpos, IsInstanceOf), List(v, Expressions.CONST_STRING(vpos, t)))
}
.reduceRight[Expressions.EXPR](BINARY_OP(pos, _, BinaryOperation.OR_OP, _))
Right(r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import com.wavesplatform.lang.v1.ContractLimits.*
import com.wavesplatform.lang.v1.FunctionHeader
import com.wavesplatform.lang.v1.compiler.Types.*
import com.wavesplatform.lang.v1.evaluator.ctx.impl.PureContext.MaxListLengthV4
import com.wavesplatform.lang.{CommonError, ExecutionError}
import com.wavesplatform.lang.*
import monix.eval.Coeval

import java.nio.charset.StandardCharsets
Expand Down Expand Up @@ -165,7 +165,7 @@ object Terms {
var body: EXPR
}

@Deprecated
@deprecated("use BLOCK instead", "1.0")
case class LET_BLOCK(let: LET, var body: EXPR) extends EXPR with BLOCK_DEF {
def toStr: Coeval[String] =
for {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ object TypeInferrer {
(groupByPosition(matchingTuples.map(_.types)) zip commonTuple.types)
.forall {
case (groupedTypes, t: TUPLE) =>
checkTuplesCommonType(groupedTypes.collect { case t: TUPLE => t }, t)
checkTuplesCommonType(groupedTypes.collect { case tt: TUPLE => tt }, t)
case (groupedTypes, singleType) =>
singleType.typeList.length < groupedTypes.map(_.typeList.length).sum
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import com.wavesplatform.lang.v1.evaluator.ctx.*
import com.wavesplatform.lang.v1.evaluator.ctx.EnabledLogEvaluationContext.Lenses
import com.wavesplatform.lang.v1.task.imports.*
import com.wavesplatform.lang.v1.traits.Environment
import com.wavesplatform.lang.{CoevalF, CommonError, EvalF, ExecutionError}
import com.wavesplatform.lang.*

import scala.collection.mutable.ListBuffer
import scala.util.Try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import com.wavesplatform.lang.v1.evaluator.EvaluatorV2.logFunc
import com.wavesplatform.lang.v1.evaluator.ctx.impl.waves.Bindings
import com.wavesplatform.lang.v1.evaluator.ctx.*
import com.wavesplatform.lang.v1.traits.Environment
import com.wavesplatform.lang.{CommonError, ExecutionError, ThrownError}
import com.wavesplatform.lang.*
import monix.eval.Coeval
import shapeless.syntax.std.tuple.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package com.wavesplatform.lang.v1.evaluator

import cats.Id
import cats.implicits._
import cats.implicits.*
import com.wavesplatform.common.state.ByteStr
import com.wavesplatform.lang.{ExecutionError, CommonError}
import com.wavesplatform.lang.*
import com.wavesplatform.lang.directives.values.{StdLibVersion, V3, V4, V5}
import com.wavesplatform.lang.v1.compiler.ScriptResultSource.CallableFunction
import com.wavesplatform.lang.v1.compiler.Terms._
import com.wavesplatform.lang.v1.compiler.Terms.*
import com.wavesplatform.lang.v1.compiler.Types.CASETYPEREF
import com.wavesplatform.lang.v1.evaluator.ctx.EvaluationContext
import com.wavesplatform.lang.v1.evaluator.ctx.impl._
import com.wavesplatform.lang.v1.evaluator.ctx.impl.*
import com.wavesplatform.lang.v1.evaluator.ctx.impl.waves.{FieldNames, Types}
import com.wavesplatform.lang.v1.traits.Environment
import com.wavesplatform.lang.v1.traits.domain.*
import com.wavesplatform.lang.v1.traits.domain.Recipient.{Address, Alias}
import com.wavesplatform.lang.v1.traits.domain._

sealed trait ScriptResult {
def returnedValue: EVALUATED = unit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import com.wavesplatform.lang.v1.evaluator.FunctionIds.*
import com.wavesplatform.lang.v1.evaluator.ctx.impl.crypto.RSA.DigestAlgorithm
import com.wavesplatform.lang.v1.evaluator.ctx.{BaseFunction, EvaluationContext, NativeFunction}
import com.wavesplatform.lang.v1.{BaseGlobal, CTX}
import com.wavesplatform.lang.{CommonError, ExecutionError, ThrownError}
import com.wavesplatform.lang.*

import scala.collection.mutable
import scala.util.Try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ object PureContext {
r => r >= BigIntMin && r <= BigIntMax,
s"$a ${op.func} $b is out of range."
)
.map(CONST_BIGINT)
.map(CONST_BIGINT.apply)
.leftMap(CommonError(_))
case args =>
Left(s"Unexpected args $args for BigInt operator '${op.func}'")
Expand Down Expand Up @@ -1356,7 +1356,7 @@ object PureContext {
body: (BigInt, BigInt) => Boolean
): BaseFunction[NoContext] =
NativeFunction(opsToFunctions(op), Map(V5 -> 8L, V6 -> 8L, V7 -> 8L, V8 -> 1L), func, BOOLEAN, ("a", BIGINT), ("b", BIGINT)) {
case CONST_BIGINT(a) :: CONST_BIGINT(b) :: Nil => Try(body(a, b)).toEither.bimap(_.getMessage, CONST_BOOLEAN)
case CONST_BIGINT(a) :: CONST_BIGINT(b) :: Nil => Try(body(a, b)).toEither.bimap(_.getMessage, CONST_BOOLEAN.apply)
case xs => notImplemented[Id, EVALUATED](s"${opsToFunctions(op)}(a: BIGINT, b: BIGINT)", xs)
}

Expand Down Expand Up @@ -1598,7 +1598,7 @@ object PureContext {
) {
Left("pow: scale out of range 0-8")
} else {
global.pow(b, bp.toInt, e, ep.toInt, rp.toInt, Rounding.byValue(round), useNewPrecision).map(CONST_LONG).leftMap(CommonError(_))
global.pow(b, bp.toInt, e, ep.toInt, rp.toInt, Rounding.byValue(round), useNewPrecision).map(CONST_LONG.apply).leftMap(CommonError(_))
}
case xs => notImplemented[Id, EVALUATED]("pow(base: Int, bp: Int, exponent: Int, ep: Int, rp: Int, round: Rounds)", xs)
}
Expand Down Expand Up @@ -1632,7 +1632,7 @@ object PureContext {
) {
Left(CommonError("log: scale out of range 0-8"))
} else {
global.log(b, bp, e, ep, rp, Rounding.byValue(round)).map(CONST_LONG).leftMap(CommonError(_))
global.log(b, bp, e, ep, rp, Rounding.byValue(round)).map(CONST_LONG.apply).leftMap(CommonError(_))
}
case xs => notImplemented[Id, EVALUATED]("log(exponent: Int, ep: Int, base: Int, bp: Int, rp: Int, round: Rounds)", xs)
}
Expand Down Expand Up @@ -1665,7 +1665,7 @@ object PureContext {
global
.powBigInt(b, bp, e, ep, rp, Rounding.byValue(round), useNewPrecision)
.filterOrElse(v => v <= BigIntMax && v >= BigIntMin, "Result out of 512-bit range")
.bimap(e => s"$e on BigInt pow calculation", CONST_BIGINT)
.bimap(e => s"$e on BigInt pow calculation", CONST_BIGINT.apply)
}
case xs => notImplemented[Id, EVALUATED]("pow(base: BigInt, bp: Int, exponent:Big Int, ep: Int, rp: Int, round: Rounds)", xs)
}
Expand Down Expand Up @@ -1719,7 +1719,7 @@ object PureContext {
) {
Left("Scale out of range 0-18")
} else {
global.logBigInt(b, bp, e, ep, rp, Rounding.byValue(round)).map(CONST_BIGINT)
global.logBigInt(b, bp, e, ep, rp, Rounding.byValue(round)).map(CONST_BIGINT.apply)
}
r.leftMap(e => s"$e on BigInt log calculation")
case xs => notImplemented[Id, EVALUATED]("log(exponent: BigInt, ep: Int, base:Big Int, bp: Int, rp: Int, round: Rounds)", xs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ package object converters {
implicit def c(is: Seq[EVALUATED]): EVALUATED = ARR(is.toIndexedSeq, false).explicitGet()

implicit def fromOptionBV(v: Option[ByteStr]): EVALUATED = v.flatMap(CONST_BYTESTR(_).toOption).getOrElse(unit)
implicit def fromOptionL(v: Option[Long]): EVALUATED = v.map(CONST_LONG).getOrElse(unit)
implicit def fromOptionL(v: Option[Long]): EVALUATED = v.map(CONST_LONG.apply).getOrElse(unit)
implicit def fromOptionS(v: Option[String]): EVALUATED = v.flatMap(CONST_STRING(_).toOption).getOrElse(unit)
implicit def fromOptionB(v: Option[Boolean]): EVALUATED = v.map(CONST_BOOLEAN).getOrElse(unit)
implicit def fromOptionB(v: Option[Boolean]): EVALUATED = v.map(CONST_BOOLEAN.apply).getOrElse(unit)
implicit def fromOptionCO(v: Option[CaseObj]): EVALUATED = v.getOrElse(unit)

implicit def pure[F[_]: Monad, A <: EVALUATED](
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package object impl {

val arrayDataByKeyHeaders: Set[FunctionHeader] =
Set(DATA_LONG_FROM_ARRAY, DATA_BOOLEAN_FROM_ARRAY, DATA_BYTES_FROM_ARRAY, DATA_STRING_FROM_ARRAY)
.map(Native)
.map(Native.apply)

val arrayDataByIndexHeaders: Set[FunctionHeader] =
Set("getInteger", "getBoolean", "getBinary", "getString")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ object Bindings {
buildPaymentTransactionType(proofsEnabled),
Map("amount" -> CONST_LONG(amount)) ++ provenTxPart(p, proofsEnabled, version) + mapRecipient(recipient)
)
case transfer: Tx.Transfer => transferTransactionObject(transfer, proofsEnabled, version)
case ttx: Tx.Transfer => transferTransactionObject(ttx, proofsEnabled, version)
case Tx.Issue(p, quantity, name, description, reissuable, decimals, scriptOpt) =>
CaseObj(
buildIssueTransactionType(proofsEnabled, version),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import com.wavesplatform.lang.v1.evaluator.{ContextfulNativeFunction, Contextful
import com.wavesplatform.lang.v1.traits.domain.{Issue, Lease, Recipient}
import com.wavesplatform.lang.v1.traits.{DataType, Environment}
import com.wavesplatform.lang.v1.{BaseGlobal, FunctionHeader}
import com.wavesplatform.lang.{CoevalF, CommonError, ExecutionError, FailOrRejectError, ThrownError}
import com.wavesplatform.lang.{CoevalF, CommonError, ExecutionError, FailOrRejectError, ThrownError, toError}
import monix.eval.Coeval
import shapeless.Coproduct.unsafeGet

Expand Down Expand Up @@ -440,13 +440,13 @@ object Functions {
caseObjToRecipient(c)
.fold(
_.asLeft[EVALUATED].pure[F],
r => env.accountBalanceOf(r, None).map(_.map(CONST_LONG).leftMap(CommonError(_)))
r => env.accountBalanceOf(r, None).map(_.map(CONST_LONG.apply).leftMap(CommonError(_)))
)
case (c: CaseObj) :: CONST_BYTESTR(assetId: ByteStr) :: Nil =>
caseObjToRecipient(c)
.fold(
_.asLeft[EVALUATED].pure[F],
r => env.accountBalanceOf(r, Some(assetId.arr)).map(_.map(CONST_LONG).leftMap(CommonError(_)))
r => env.accountBalanceOf(r, Some(assetId.arr)).map(_.map(CONST_LONG.apply).leftMap(CommonError(_)))
)
case xs =>
notImplemented[F, EVALUATED](s"assetBalance(a: Address|Alias, u: ByteVector|Unit)", xs)
Expand All @@ -470,7 +470,7 @@ object Functions {
caseObjToRecipient(c)
.fold(
_.asLeft[EVALUATED].pure[F],
r => env.accountBalanceOf(r, Some(assetId.arr)).map(_.map(CONST_LONG).leftMap(CommonError(_)))
r => env.accountBalanceOf(r, Some(assetId.arr)).map(_.map(CONST_LONG.apply).leftMap(CommonError(_)))
)
case xs =>
notImplemented[F, EVALUATED](s"assetBalance(a: Address|Alias, u: ByteVector)", xs)
Expand Down Expand Up @@ -628,7 +628,7 @@ object Functions {
}
case (dApp: CaseObj) :: _ if dApp.caseType == aliasType =>
dApp.fields.get("alias") match {
case Some(CONST_STRING(a)) => env.resolveAlias(a).map(_.bimap(ThrownError, _.bytes))
case Some(CONST_STRING(a)) => env.resolveAlias(a).map(_.bimap(ThrownError.apply, _.bytes))
case arg => thrown(s"Unexpected alias arg $arg")
}
case arg :: _ =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class Parser(stdLibVersion: StdLibVersion)(implicit offset: LibrariesOffset) {
ContractLimits.MaxTupleSize
)
~ comment ~/ ")")
.map(Tuple)
.map(Tuple.apply)

def funcP(implicit c: fastparse.P[Any]): P[FUNC] = {
def funcName = anyVarName(check = true)
Expand Down Expand Up @@ -381,13 +381,13 @@ class Parser(stdLibVersion: StdLibVersion)(implicit offset: LibrariesOffset) {
}

def accessP[A: P]: P[(Int, Accessor, Int)] = P(
(("" ~ comment ~ Index ~ "." ~/ comment ~ getterOrOOPCall) ~~ Index) | (Index ~~ "[" ~/ baseExpr.map(ListIndex) ~ "]" ~~ Index)
(("" ~ comment ~ Index ~ "." ~/ comment ~ getterOrOOPCall) ~~ Index) | (Index ~~ "[" ~/ baseExpr.map(ListIndex.apply) ~ "]" ~~ Index)
)

def getterOrOOPCall[A: P]: P[Accessor] =
(genericMethodName ~~/ ("[" ~ unionTypeP ~/ "]")).map { case (name, tpe) =>
GenericMethod(name, tpe)
} | (accessOrName.map(Getter) ~/ comment ~~ ("(" ~/ comment ~ functionCallArgs.opaque("""")"""") ~ comment ~/ ")").?).map {
} | (accessOrName.map(Getter.apply) ~/ comment ~~ ("(" ~/ comment ~ functionCallArgs.opaque("""")"""") ~ comment ~/ ")").?).map {
case (g @ Getter(name), args) =>
args.fold(g: Accessor)(Method(name, _))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ object SerdeV1 extends Serde[ByteBuffer, ByteArrayOutputStream] {
case E_LONG => Coeval.now(CONST_LONG(bb.getLong))
case E_BYTES => Coeval.now(CONST_BYTESTR(ByteStr(bb.getBytes)).explicitGet())
case E_STRING => Coeval.now(CONST_STRING(bb.getString).explicitGet())
case E_IF => (desAuxR(bb, allowObjects, acc), desAuxR(bb, allowObjects, acc), desAuxR(bb, allowObjects, acc)).mapN(IF)
case E_IF => (desAuxR(bb, allowObjects, acc), desAuxR(bb, allowObjects, acc), desAuxR(bb, allowObjects, acc)).mapN(IF.apply)
case E_BLOCK =>
for {
name <- Coeval.now(bb.getString)
Expand Down
Loading

0 comments on commit 6de6c64

Please sign in to comment.