File tree Expand file tree Collapse file tree 6 files changed +19
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 6 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,8 @@ class ImplicitSearchError(
334
334
*/
335
335
private def userDefinedImplicitNotFoundTypeMessage : Option [String ] =
336
336
pt.baseClasses.iterator
337
+ // Don't inherit "No implicit view available..." message if subtypes of Function1 are not treated as implicit conversions anymore
338
+ .filter(sym => Feature .migrateTo3 || sym != defn.Function1 )
337
339
.map(userDefinedImplicitNotFoundTypeMessage(_))
338
340
.find(_.isDefined).flatten
339
341
Original file line number Diff line number Diff line change
1
+ -- Error: tests/neg/i10603a.scala:2:35 ---------------------------------------------------------------------------------
2
+ 2 | val x = implicitly[List[Boolean]] // error
3
+ | ^
4
+ | no implicit argument of type List[Boolean] was found for parameter e of method implicitly in object Predef
Original file line number Diff line number Diff line change
1
+ object Test {
2
+ val x = implicitly[List [Boolean ]] // error
3
+ }
Original file line number Diff line number Diff line change
1
+ -- Error: tests/neg/i10603b.scala:4:35 ---------------------------------------------------------------------------------
2
+ 4 | val x = implicitly[List[Boolean]] // error
3
+ | ^
4
+ | No implicit view available from Int => Boolean.
Original file line number Diff line number Diff line change
1
+ import language .`3.0-migration`
2
+
3
+ object Test {
4
+ val x = implicitly[List [Boolean ]] // error
5
+ }
Original file line number Diff line number Diff line change 1
1
-- Error: tests/neg/summon-function.scala:2:23 -------------------------------------------------------------------------
2
2
2 | summon[Int => String] // error
3
3
| ^
4
- | No implicit view available from Int => String.
4
+ | no implicit argument of type Int => String was found for parameter x of method summon in object Predef
You can’t perform that action at this time.
0 commit comments