We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f20f92a commit 4a719d0Copy full SHA for 4a719d0
compiler/src/dotty/tools/dotc/typer/Implicits.scala
@@ -620,6 +620,8 @@ trait Implicits { self: Typer =>
620
val tag = bindFreeVars(arg)
621
if (bindFreeVars.ok) ref(defn.QuotedType_apply).appliedToType(tag)
622
else EmptyTree
623
+ case arg :: Nil if ctx.inTransparentMethod =>
624
+ ref(defn.QuotedType_apply).appliedToType(arg)
625
case _ =>
626
EmptyTree
627
}
tests/run/i4515/Macro_1.scala
@@ -0,0 +1,5 @@
1
+
2
+object Macro {
3
+ transparent def foo[X](x: X): Unit = ~fooImpl('(x))
4
+ def fooImpl[X: quoted.Type](x: quoted.Expr[X]): quoted.Expr[Unit] = '()
5
+}
tests/run/i4515/Test_2.scala
@@ -0,0 +1,6 @@
+object Test {
+ def main(args: Array[String]): Unit = {
+ Macro.foo(4)
+ }
6
0 commit comments