From f53883035f9ea850dd2475213277e5d71de30d71 Mon Sep 17 00:00:00 2001 From: Will Sargent Date: Fri, 21 May 2021 09:46:29 -0700 Subject: [PATCH] Snippet won't compile without import --- _overviews/scala3-macros/tutorial/macros.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_overviews/scala3-macros/tutorial/macros.md b/_overviews/scala3-macros/tutorial/macros.md index 0af6bc9699..be0f40d473 100644 --- a/_overviews/scala3-macros/tutorial/macros.md +++ b/_overviews/scala3-macros/tutorial/macros.md @@ -188,6 +188,8 @@ Varargs in Scala are represented with `Seq`, hence when we write a macro with a It is possible to recover each individual argument (of type `Expr[T]`) using the `scala.quoted.Varargs` extractor. ```scala +import scala.quoted.Varargs + inline def sumNow(inline nums: Int*): Int = ${ sumCode('nums) }