File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -876,7 +876,8 @@ trait Implicits:
876
876
def ignoredInstanceNormalImport = arg.tpe match
877
877
case fail : SearchFailureType =>
878
878
if (fail.expectedType eq pt) || isFullyDefined(fail.expectedType, ForceDegree .none) then
879
- inferImplicit(fail.expectedType, fail.argument, arg.span) match {
879
+ inferImplicit(fail.expectedType, fail.argument, arg.span)(
880
+ using findHiddenImplicitsCtx(ctx)) match {
880
881
case s : SearchSuccess => Some (s)
881
882
case f : SearchFailure =>
882
883
f.reason match {
Original file line number Diff line number Diff line change
1
+ -- Error: tests/neg/hidden.scala:6:13 ----------------------------------------------------------------------------------
2
+ 6 | summon[Int] // error
3
+ | ^
4
+ | no implicit argument of type Int was found for parameter x of method summon in object Predef
5
+ |
6
+ | Note: given instance given_Int in object A was not considered because it was not imported with `import given`.
You can’t perform that action at this time.
0 commit comments