Skip to content

[Lua] Modules are not initialized in derived classes when the module is used in the base class #1052

Open
@jlfarris91

Description

@jlfarris91

It looks like modules are not correctly initialized for derived classes where the module is used in the base class.

I have a base class TlsBuildingDefinition that uses a module called UnitDefinitionInitModule and a derived class called CannonTowerDefinition.

image

image

In the compiled lua you can see that the TlsBuildingDefinition create function initializes all the module fields, but the CannonTowerDefinition create function does not.

image

image

So, when constructing CannonTowerDefinition instance, all the module fields are nil and ultimately break a lot of dependent code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions