E047: Cyclic Reference Involving Implicit

This error is emitted when the compiler detects a cyclic reference involving an implicit value.

The compiler message states: "Cyclic reference involving implicit <symbol>"

The symbol in question is declared as part of a cycle which makes it impossible for the compiler to decide upon its type. This might happen when the right-hand side of the symbol's definition involves an implicit search that depends on the type being inferred.

To avoid this error, try giving the symbol an explicit type annotation.

This error is related to CyclicReferenceInvolving (E046) but specifically targets cases where the cycle involves implicit values. It is triggered in TypeErrors.scala when:

  • The symbol is a given or implicit val (but not a method)
  • The symbol's owner is a term (local scope)

Note: This error code is active in the compiler but requires specific implicit resolution cycles that are difficult to reproduce with simple source code examples. The error typically occurs in complex implicit resolution scenarios where type inference creates circular dependencies.