OpenDream icon indicating copy to clipboard operation
OpenDream copied to clipboard

Late global proc definitions are not recognized in ObjectBuilder-orchestrated initializations

Open Altoids1 opened this issue 3 years ago • 1 comments

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).

Altoids1 avatar Oct 25 '22 21:10 Altoids1

This issue mentions things said in #704 but is atomized out since that issue hits on several things wrong with the compiler's ordering.

Altoids1 avatar Oct 25 '22 21:10 Altoids1