- Joined
- Sep 6, 2013
- Messages
- 6,742
I am a bit confused.
Prints: A M B
Why not: M B A
JPAG - JASS Proper Application Guide -> Initialization Priorities
From .j file
Isn't this wrong?
JASS:
module M
static method onInit takes nothing returns nothing
call BJDebugMsg("M")
call init()
endmethod
endmodule
//library A
struct A
static method onInit takes nothing returns nothing
call BJDebugMsg("A")
endmethod
endstruct
//endlibrary
//library B uses A
struct B
static method init takes nothing returns nothing
call BJDebugMsg("B")
endmethod
implement M
endstruct
//endlibrary
Prints: A M B
Why not: M B A
JPAG - JASS Proper Application Guide -> Initialization Priorities
From .j file
JASS:
//Struct method generated initializers/callers:
function jasshelper__initstructs13685484 takes nothing returns nothing
call ExecuteFunc("s__A_onInit")
call ExecuteFunc("s__B_onInit")
endfunction