-
Is it possible to forward-declare a global
Easy to work around by changing it to a function; just wondering if there was a better way. |
Beta Was this translation helpful? Give feedback.
Answered by
Alasdair
Nov 25, 2024
Replies: 1 comment 1 reply
-
We don't currently allow this. I think circular let-bindings would cause issues for some of our backends currently as they assume all the global let-bound constants can just be initialised in order (and some cases like below would just be impossible to handle). Also we might have issues with dependency cycles involving functions and forward-declared constants.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Timmmm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We don't currently allow this. I think circular let-bindings would cause issues for some of our backends currently as they assume all the global let-bound constants can just be initialised in order (and some cases like below would just be impossible to handle). Also we might have issues with dependency cycles involving functions and forward-declared constants.