Skip to content

Commit 5368179

Browse files
committed
update test to use empty macro impl
1 parent 5c06bd4 commit 5368179

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Diff for: tests/pos-macros/i16630.scala

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
import scala.language.experimental.macros
2+
import scala.quoted.{Quotes, Expr, Type}
23

3-
trait TraitWithTypeParam[A] {
4-
protected inline def foo: Option[A] = ${ ??? }
5-
protected def foo: Option[A] = macro ???
6-
}
4+
trait TraitWithTypeParam[A]:
5+
inline def foo: Option[A] = ${ MacrosImpl.fooImpl[A] }
6+
def foo: Option[A] = macro MacrosImpl.compatFooImpl[A]
7+
8+
object MacrosImpl:
9+
def fooImpl[A: Type](using quotes: Quotes): Expr[Option[A]] = ???
10+
def compatFooImpl[A: c.WeakTypeTag](c: Context): c.Tree = ???
11+
12+
trait Context:
13+
type WeakTypeTag[A]
14+
type Tree

0 commit comments

Comments
 (0)