File tree Expand file tree Collapse file tree 6 files changed +33
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 6 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -786,10 +786,14 @@ trait Implicits { self: Typer =>
786786 case _ =>
787787 arg.tpe match {
788788 case tpe : SearchFailureType =>
789+ val original = arg match
790+ case Inlined (call, _, _) => call
791+ case _ => arg
792+
789793 i """ $headline.
790794 |I found:
791795 |
792- | ${arg .show.replace(" \n " , " \n " )}
796+ | ${original .show.replace(" \n " , " \n " )}
793797 |
794798 |But ${tpe.explanation}. """
795799 }
Original file line number Diff line number Diff line change 1+
2+ -- Error: tests/neg-macros/i9014/Test_2.scala:1:23 ---------------------------------------------------------------------
3+ 1 |val tests = summon[Bar] // error
4+ | ^
5+ | no implicit argument of type Bar was found for parameter x of method summon in object DottyPredef.
6+ | I found:
7+ |
8+ | given_Bar
9+ |
10+ | But method given_Bar does not match type Bar.
Original file line number Diff line number Diff line change 1+ import scala .quoted ._
2+ trait Bar
3+ inline given as Bar = $ { impl }
4+ def impl (using qctx : QuoteContext ): Expr [Bar ] = qctx.throwError(" Failed to expand!" )
Original file line number Diff line number Diff line change 1+ val tests = summon[Bar ] // error
Original file line number Diff line number Diff line change 1+ -- Error: tests/neg/i9014.scala:4:25 -----------------------------------------------------------------------------------
2+ 4 | val tests = summon[Bar] // error
3+ | ^
4+ | no implicit argument of type Bar was found for parameter x of method summon in object DottyPredef.
5+ | I found:
6+ |
7+ | Bar.given_Bar
8+ |
9+ | But method given_Bar in object Bar does not match type Bar.
Original file line number Diff line number Diff line change 1+ trait Bar
2+ object Bar :
3+ inline given as Bar = compiletime.error(" Failed to expand!" )
4+ val tests = summon[Bar ] // error
You can’t perform that action at this time.
0 commit comments