We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4c0ec77 + 3048f4b commit 39b8338Copy full SHA for 39b8338
compiler/src/dotty/tools/dotc/transform/ShortcutImplicits.scala
@@ -129,6 +129,9 @@ class ShortcutImplicits extends MiniPhase with IdentityDenotTransformer { thisPh
129
.appliedToArgss(vparamSymss.map(_.map(ref(_))) :+ clparamSyms.map(ref(_)))
130
val fwdClosure = cpy.Block(tree)(cpy.DefDef(meth)(rhs = forwarder) :: Nil, cl)
131
(remappedCore, fwdClosure)
132
+ case id: Ident =>
133
+ val SAMType(mt) = id.tpe.widen
134
+ splitClosure(tpd.Lambda(mt, args => id.select(nme.apply).appliedToArgs(args))(ctx.withOwner(original)))
135
case EmptyTree =>
136
(_ => _ => EmptyTree, EmptyTree)
137
}
tests/pos/i5295.scala
@@ -0,0 +1,2 @@
1
+inline def foo: String = bar given (4)
2
+private def bar: given Int => String = "baz"
0 commit comments