Skip to content

Commit 4dead2a

Browse files
committed
Make changes necessary due to #8479
1 parent 124d26c commit 4dead2a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/shared/src/main/scala-3/scodec/bits/Interpolators.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import scala.quoted.matching._
55

66
/**
77
* Provides the `hex` string interpolator, which returns `ByteVector` instances from hexadecimal strings.
8-
*
8+
*
99
* @example {{{
1010
* scala> val b = hex"deadbeef"
1111
* val b: scodec.bits.ByteVector = ByteVector(4 bytes, 0xdeadbeef)
1212
* }}}
1313
*/
14-
inline def (ctx: StringContext).hex (inline args: ByteVector*): ByteVector =
14+
inline def (inline ctx: StringContext).hex (inline args: ByteVector*): ByteVector =
1515
${hexInterpolator('ctx, 'args)}
1616

1717
private def hexInterpolator(strCtxExpr: Expr[StringContext], argsExpr: Expr[Seq[ByteVector]])(using qctx: QuoteContext): Expr[ByteVector] = {
1818
(strCtxExpr, argsExpr) match {
19-
case ('{ StringContext(${ExprSeq(parts)}: _*) }, ExprSeq(args)) =>
19+
case ('{ StringContext(${Varargs(parts)}: _*) }, Varargs(args)) =>
2020
val partValues: Seq[String] = parts.map { case p @ Const(part) =>
2121
if (ByteVector.fromHex(part).isEmpty)
2222
qctx.error("hexadecimal string literal may only contain characters [0-9a-fA-f]", p)
@@ -42,12 +42,12 @@ private def hexInterpolator(strCtxExpr: Expr[StringContext], argsExpr: Expr[Seq[
4242
* val b: scodec.bits.BitVector = BitVector(10 bits, 0xaa8)
4343
* }}}
4444
*/
45-
inline def (ctx: StringContext).bin (inline args: BitVector*): BitVector =
45+
inline def (inline ctx: StringContext).bin (inline args: BitVector*): BitVector =
4646
${binInterpolator('ctx, 'args)}
4747

4848
private def binInterpolator(strCtxExpr: Expr[StringContext], argsExpr: Expr[Seq[BitVector]])(using qctx: QuoteContext): Expr[BitVector] = {
4949
(strCtxExpr, argsExpr) match {
50-
case ('{ StringContext(${ExprSeq(parts)}: _*) }, ExprSeq(args)) =>
50+
case ('{ StringContext(${Varargs(parts)}: _*) }, Varargs(args)) =>
5151
val partValues: Seq[String] = parts.map { case p @ Const(part) =>
5252
if (BitVector.fromBin(part).isEmpty)
5353
qctx.error("binary string literal may only contain characters [0, 1]", p)

0 commit comments

Comments
 (0)