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
44import com .avsystem .commons .macros .misc .{Fail , Ok , Res }
55
66import scala .annotation .StaticAnnotation
7- import scala .reflect .{ClassTag , classTag }
87
98trait MacroMetadatas extends MacroSymbols {
109
@@ -152,7 +151,7 @@ trait MacroMetadatas extends MacroSymbols {
152151 if (checked)
153152 tryInferCachedImplicit(tpe).map(n => Ok (q " $n" )).getOrElse(Fail (implicitNotFound(tpe)))
154153 else
155- Ok (q " ${infer(tpe)}" )
154+ Ok (q " ${infer(tpe, matchedSymbol.real )}" )
156155 case ParamArity .Optional (tpe) =>
157156 Ok (mkOptional(tryInferCachedImplicit(tpe).map(n => q " $n" )))
158157 case _ : ParamArity .Multi =>
Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ trait MacroSymbols extends MacroCommons {
101101 def infer (tpt : Tree ): TermName =
102102 infer(getType(tpt))
103103
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)
106106
107107 val name : TermName = symbol.name.toTermName
108108 val safeName : TermName = c.freshName(symbol.name.toTermName)
You can’t perform that action at this time.
0 commit comments