File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
commons-macros/src/main/scala/com/avsystem/commons/macros/meta Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ package macros.meta
4
4
import com .avsystem .commons .macros .misc .{Fail , Ok , Res }
5
5
6
6
import scala .annotation .StaticAnnotation
7
- import scala .reflect .{ClassTag , classTag }
8
7
9
8
trait MacroMetadatas extends MacroSymbols {
10
9
@@ -152,7 +151,7 @@ trait MacroMetadatas extends MacroSymbols {
152
151
if (checked)
153
152
tryInferCachedImplicit(tpe).map(n => Ok (q " $n" )).getOrElse(Fail (implicitNotFound(tpe)))
154
153
else
155
- Ok (q " ${infer(tpe)}" )
154
+ Ok (q " ${infer(tpe, matchedSymbol.real )}" )
156
155
case ParamArity .Optional (tpe) =>
157
156
Ok (mkOptional(tryInferCachedImplicit(tpe).map(n => q " $n" )))
158
157
case _ : ParamArity .Multi =>
Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ trait MacroSymbols extends MacroCommons {
101
101
def infer (tpt : Tree ): TermName =
102
102
infer(getType(tpt))
103
103
104
- def infer (tpe : Type ): TermName =
105
- inferCachedImplicit(tpe, s " $problemStr: " , pos)
104
+ def infer (tpe : Type , forSym : MacroSymbol = this ): TermName =
105
+ inferCachedImplicit(tpe, s " ${forSym. problemStr} : " , forSym. pos)
106
106
107
107
val name : TermName = symbol.name.toTermName
108
108
val safeName : TermName = c.freshName(symbol.name.toTermName)
You can’t perform that action at this time.
0 commit comments