Skip to content

Document interaction of implicit resolution and macros #10213

Closed
@rnd4222

Description

@rnd4222

It is not very clear how implicit resolution works in presence of (possibly failing) macro expansions.

Example:

implicit inline def eqGenInt: Eq[Int] = ${ ... } // throws on expansion, so not actually overlapping
implicit def eqInt: Eq[Int] = new Eq[Int] { ... }

For now it seems that failing expansion is ignored and implicit resolution proceeds to other instances, even if they are "overlapping" (modulo expansion failures).

Can I rely on this behaviour?
If so, it would be great to have it documented somewhere.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions