On Friday, 12 April 2019 at 10:49:19 UTC, Jamie wrote:
I was trying to declare a static variable dependent on another static variable, but it didn't work. Are static variables not known to other static variables at compile time?

Add `const` or `immutable` to A and it will work.
I don't know why B can't be initialized with A's initial value if A is mutable, but there's probably a rationale for that.

Reply via email to