Statically initialize static classes that are members of the current class being statically initialized
This commit is contained in:
parent
d9566698d2
commit
2ac0e18aac
|
@ -67,16 +67,13 @@ public final class StructuralOrganizer
|
|||
|
||||
/* TODO: Ensure that we set dependences as A.B.C with A B C all static */
|
||||
|
||||
/* Statically initialize the class */
|
||||
/* Statically initialize the class (make module depend on it) */
|
||||
TreeNode classWalkInitDep = staticInitializeClass(classType);
|
||||
root.addDep(classWalkInitDep);
|
||||
|
||||
/* Make the variable dependent on this */
|
||||
/* Make the Module depend on this variable being initialized */
|
||||
TreeNode varNode = poolNode(variable);
|
||||
root.addDep(varNode);
|
||||
|
||||
// /* Mark the variable as dependent on having sttaic init for class-type class */
|
||||
// varNode.addDep(classWalkInitDep);
|
||||
}
|
||||
|
||||
|
||||
|
@ -231,6 +228,12 @@ public final class StructuralOrganizer
|
|||
|
||||
}
|
||||
}
|
||||
/* Static class definitions */
|
||||
else if(cast(Clazz)entity)
|
||||
{
|
||||
/* Statically initialize the static class */
|
||||
staticInitializeClass(cast(Clazz)entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue