Error codes

E0115: constant depends on itself

In a terminal: auk explain E0115 prints this page.

On this page

A module constant's initializer refers back to the constant itself, directly or through other constants, so it has no starting value. Constants are computed once, in dependency order.

Wrong#

auk
let A = B + 1
let B = A + 1

Fixed#

auk
let A = 1
let B = A + 1

Common causes#

  • Two constants defined in terms of each other.
  • A constant whose initializer calls a function that reads the constant.
  • Give one of them a literal value, or compute the pair in a function.

Stuck on a word? Try the glossary. Got a compiler error? Look up its code. Improve this page