OpenDream
OpenDream copied to clipboard
Late global proc definitions are not recognized in ObjectBuilder-orchestrated initializations
Another wordy issue title, sorry, but the problem is that this:
var/static/value = proc_that_has_value()
/proc/main()
ASSERT(value == 7)
/proc/proc_that_has_value()
return 7
does not compile in OD at the moment, it complaining about proc_that_has_value not being defined.
The issue is that ObjectBuilder isn't really given a list of global procs prior to its evaluation, so the expression is unresolvable when it's generating statics and object prototypes.
Ike tells me that fixing this is necessary to get /TG/ working (at least, in a more unmodified way).
This issue mentions things said in #704 but is atomized out since that issue hits on several things wrong with the compiler's ordering.