Skip to content

Documentation on implicit specificity is out of sync with implementation #7075

Closed
@smarter

Description

@smarter

http://dotty.epfl.ch/docs/reference/changed-features/implicit-resolution.html says:

All else being equal, an alternative that takes more inferable parameters is taken to be more specific than an alternative that takes fewer.

And the documentation in the code says https://github.com/lampepfl/dotty/blob/6f6751d5eb7f4b667f499f6326970d55b0ae62af/compiler/src/dotty/tools/dotc/typer/Applications.scala#L1261-L1263

But actually the implementation does the exact reverse: https://github.com/lampepfl/dotty/blob/6f6751d5eb7f4b667f499f6326970d55b0ae62af/compiler/src/dotty/tools/dotc/typer/Applications.scala#L1434-L1436

As far as I remember, the current implementation is the intended behavior that was implemented after experimenting with the documented behavior. @milessabin: do you confirm ? Also in your experience, is the current behavior helpful/neutral/harmful for the stuff you want to do ?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions