I don't believe the generated code would check if the class has been initialized everytime it access a static member (which includes functions). I believe checking every access would be inefficient. I looked at §17.11 in ECMA 334 and it says
The execution of a static constructor is triggered by the first of the following events to occur within an application domain:
- An instance of the class is created.
- Any of the static members of the class are referenced.
It looks like how to figure out when 'first' happens is not defined. I can't think of any way to do it but to check every time. How might it be done?