E4155

E4155#

Cycle in const, fnalias, typealias or traitalias declaration.

const declaration can refer to other constants defined in the same package, and fnalias can alias other function alias in the same package, too. typealias and traitalias can also refer to other typealias/traitalias in current package. But these definitions must not form cycle, otherwise this error will be reported.

Erroneous example#

///|
const A : Int = B + 1

///|
const B : Int = A + 1

///|
fnalias f as g

///|
fnalias g as f

///|
typealias T1 as T2

///|
typealias T2 as T1

///|
traitalias I1 as I2

///|
traitalias I2 as I1