Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/typer/Implicits.scala
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,8 @@ trait Implicits:
def ignoredInstanceNormalImport = arg.tpe match
case fail: SearchFailureType =>
if (fail.expectedType eq pt) || isFullyDefined(fail.expectedType, ForceDegree.none) then
inferImplicit(fail.expectedType, fail.argument, arg.span) match {
inferImplicit(fail.expectedType, fail.argument, arg.span)(
using findHiddenImplicitsCtx(ctx)) match {
case s: SearchSuccess => Some(s)
case f: SearchFailure =>
f.reason match {
Expand Down
6 changes: 6 additions & 0 deletions tests/neg/hidden.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- Error: tests/neg/hidden.scala:6:13 ----------------------------------------------------------------------------------
6 | summon[Int] // error
| ^
| no implicit argument of type Int was found for parameter x of method summon in object Predef
|
| Note: given instance given_Int in object A was not considered because it was not imported with `import given`.