8000 regression in implicit search adapting implicit method with multiple param lists to a curried function type · Issue #10858 · scala/bug · GitHub
[go: up one dir, main page]

Skip to content
regression in implicit search adapting implicit method with multiple param lists to a curried function type #10858
@retronym

Description

@retronym

2.11:

scala> { implicit def foo(a: Int)(b: Int, c: Int): String = "" + a + b; implicitly[Int => (Int, Int) => String].apply(1).apply(2, 3) }
warning: there was one feature warning; re-run with -feature for details
res0: String = 12

2.12

scala> { implicit def foo(a: Int)(b: Int, c: Int): String = "" + a + b; implicitly[Int => (Int, Int) => String].apply(1).apply(2, 3) }
<console>:12: error: No implicit view available from Int => (Int, Int) => String.
       { implicit def foo(a: Int)(b: Int, c: Int): String = "" + a + b; implicitly[Int => (Int, Int) => String].apply(1).apply(2, 3) }
                                                                                  ^

Regressed with the pre-calculation of ptFunctionArity in scala/scala#5875, in which I failed to account for the recursion in checkCompatibility.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0